using UnityEngine; public class MerchantIdle : State { MerchantMove moveState; protected override void OnInitialize() { Owner.TryGetState(out moveState); Debug.Assert(moveState != null, "move state not exist"); } public override void Enter() { Owner.Excutor.IsBattleReady = true; Debug.Assert(Owner.Excutor.SkeletonAnimation.TryGetAnimation("idle", out Spine.Animation _), "idle animation not exist"); Owner.Excutor.SkeletonAnimation.AnimationState.SetAnimation(0, "idle", true); } public override void Excute() { if(moveState.HasDestination) { Owner.ChangeState(); } } }