Beispiel #1
0
 public void UseActiveSkill()
 {
     if (uniData.PlayerStateMachine.CurrentStateID == (uint)UnitData.UnitStateType.attack)
     {
         return;                                                                                  //当前已经是attack状态则不转换为attack状态
     }
     uniData.PlayerStateMachine.SwitchState((uint)UnitData.UnitStateType.attack, null, null);
     AnimationPlay.Play(uniData, animationName, false);
     uniData.animationData.skeletonAnimation.state.Complete += ReturnToIdle;
     uniData.animationData.skeletonAnimation.state.Event    += HurtUnit;
 }
Beispiel #2
0
 //void OnEnter();
 //void OnLeave();
 //等待补全
 public void OnEnter(StateMachine machine, IState preState, object param1, object param2)
 {
     //Debug.Log("进入了IDLE动画");
     AnimationPlay.Play(unitData, "idle");
 }
Beispiel #3
0
 //void OnEnter();
 //void OnLeave();
 //等待补全
 public void OnEnter(StateMachine machine, IState preState, object param1, object param2)
 {
     AnimationPlay.Play(unitData, "run");
 }