Exemple #1
0
 void Update()
 {
     currentAction = CurrentAction;
     if (CurrentState is Dead)
     {
         return;
     }
     if (CurrentAction != null)
     {
         if (CurrentAction.EvaluateCompletion())
         {
             ExecuteNextAction();
         }
     }
     else
     {
         if (ScheduledActionsCount > 0)
         {
             ExecuteNextAction();
         }
         else
         {
             defaultBehaviour.ApplyBehaviour();
         }
     }
 }