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