Exemplo n.º 1
0
 public void Transition(StateTransition transition)
 {
     if (transition == null)
     {
         return;
     }
     if (transition.From == CurrentState)
     {
         LastTransition = transition;
         CurrentState   = transition.To;
     }
 }
Exemplo n.º 2
0
        public void Transition(string name)
        {
            StateTransition transition = null;

            foreach (var t in Transitions)
            {
                if (t.From == CurrentState && t.Name == name)
                {
                    transition = t;
                    break;
                }
            }
            if (transition != null)
            {
                Transition(transition);
            }
        }
Exemplo n.º 3
0
 public virtual void AddTrigger(StateMachineTrigger trigger, StateTransition transition)
 {
     Triggers.Add(trigger, transition);
 }
Exemplo n.º 4
0
 public void Transition(StateTransition transition)
 {
     StateMachine.Transition(transition);
 }