protected override void ConstructStart()
 {
     AddActionOnStart(objs =>
     {
         mOwner.ModiflyAction(ActionFlagEnum.Rotate, false);
         atkDir  = (AttackDirEnum)objs[0];
         onHitOn = objs[1] as Action;
         RefreshAttackDamage();
         animName   = mOwner.GetAnimNameByState(string.Format("attack_{0}", atkDir.ToString()));
         trackEntry = mOwner.PlayAnimation(1, animName, false, OnComplete);
         if (trackEntry != null)
         {
             trackEntry.Event += AnimEvent;
         }
     });
 }
Пример #2
0
 public void Attack(AttackDirEnum atkDir, Action onHitOn = null)
 {
     Post(new HFSMEvent("State.ChangeState.Attack", atkDir, onHitOn));
 }