示例#1
0
 private bool ActivateActions(int startIndex)
 {
     for (int i = startIndex; i < this.Actions.Length; i++)
     {
         this.activeActionIndex = i;
         SkillStateAction fsmStateAction = this.Actions[i];
         if (!fsmStateAction.Enabled)
         {
             fsmStateAction.Finished = true;
         }
         else
         {
             this.ActiveActions.Add(fsmStateAction);
             this.activeAction       = fsmStateAction;
             fsmStateAction.Active   = true;
             fsmStateAction.Finished = false;
             fsmStateAction.Init(this);
             fsmStateAction.Entered = true;
             fsmStateAction.OnEnter();
             if (this.Fsm.IsSwitchingState)
             {
                 return(false);
             }
             if (!fsmStateAction.Finished && this.isSequence)
             {
                 return(false);
             }
         }
     }
     return(true);
 }