Exemplo n.º 1
0
        public void UpdateFsm()
        {
            FsmTransition transition = _current.VerifyTransition();

            if (transition != null)
            {
                _current.Exit();
                transition.Fire();
                _current = _current.NextState(transition);
                _current.Enter();
            }
            else
            {
                _current.Stay();
            }
        }
Exemplo n.º 2
0
 public void AddTransition(FsmTransition transition, FsmState target)
 {
     links[transition] = target;
 }
Exemplo n.º 3
0
 public FsmState NextState(FsmTransition transition)
 {
     return(links[transition]);
 }