예제 #1
0
 private void Update_Transitions(MAnimalBrain brain)
 {
     for (int i = 0; i < transitions.Length; i++)
     {
         if (this != brain.currentState)
         {
             return;                             //BUG BUG BUG FIXed
         }
         var transition = transitions[i];
         var decision   = transition.decision;
         if (decision == null)
         {
             return;                   //Ignore Code
         }
         if (decision.interval > 0)
         {
             if (brain.CheckIfDecisionsCountDownElapsed(decision.interval, i))
             {
                 brain.ResetDecisionTime(i);
                 Decide(brain, i, transition);
             }
         }
         else
         {
             Decide(brain, i, transition);
         }
     }
 }