Hello, I have a Boss fight which I want to start when my character crosses a specific invisible Box Collider 2D I created on the map. I also created a State animation with default for the Boss to not do anything until it passes. However I do not know how to write the script so that it passes from Default State to actually the entry state of the Boss. I have a base Script:
"
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnterTheBoss : MonoBehaviour
{
void OnTriggerStay2D(Collider2D other)
{
HealthPlayer controller = other.GetComponent();
if (controller != null)
{
}
}
}