You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
718 B

using UnityEngine;
public class MerchantIdle : State<Character>
{
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<MerchantMove>();
}
}
}