using System.Collections; using UnityEngine.AI; public class CheckAction : ActionNode { public AI_Worker _Worker; public override IEnumerator Execute() { if (_Worker.animator != null) { if (_Worker.animator.GetCurrentAnimatorStateInfo(0).IsName("Check") == false) { _Worker.GetComponent().speed = 0f; _Worker.animator.CrossFade("Check", 0f); } } return base.Execute(); } }