Exemplo n.º 1
0
 public void PerformTransition(TransitionInfo transition)
 {
     for (int i = this._stateStack.Count; i >= 0; --i)
     {
         if (this._states[this._stateStack[i]].ReceiveTransition(transition) == true)
             break;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Check if the stat must catch the transition.
 /// </summary>
 /// <param name="transition">
 ///     Transition received.
 /// </param>
 /// <returns>
 ///     Does the stat had catch the transition?
 /// </returns>
 public bool ReceiveTransition(TransitionInfo transition)
 {
     for (int i = 0, size = this._transition.Count; i < size; ++i)
     {
         if (this._transition[i].transition == transition.transition)
         {
             transition.transitionType = this._transType[transition.transition];
             transition.PerformTransition(this._fsm, this);
             return (true);
         }
     }
     return (false);
 }