Example #1
0
 public void Exit()
 {
     if (_stateState != StateState.Running)
     {
         return;
     }
     _stateState = StateState.Idle;
     ProcessTransitions(StatePhase.Exit);
     StateExit();
 }
Example #2
0
 public void Enter()
 {
     if (_stateState != StateState.Idle)
     {
         return;
     }
     _stateState = StateState.Running;
     ProcessTransitions(StatePhase.Enter);
     StateEnter();
 }
Example #3
0
 public void SetFunc(StateState state, DeleAction action)
 {
     actions[(int)state] = action;
 }
Example #4
0
 //     public void Enter()
 //     {
 //         Action(StateState.ENTER);
 //     }
 //
 //     public void Tick()
 //     {
 //         Action(StateState.TICK);
 //     }
 //
 //     public void Leave()
 //     {
 //         Action(StateState.LEAVE);
 //     }
 public void Action(StateState state)
 {
     DeleAction action = actions[(int)state];
     if (action != null)
         action();
 }