コード例 #1
0
ファイル: Movement_Handler.cs プロジェクト: isngrim/Hangfire
 public void EnterState(PhysicsStateType stateType)
 {
     if (_psmStates.ContainsKey(stateType))
     {
         AbstractPSMState nextState = _psmStates[stateType];
         EnterState(nextState);
     }
 }
コード例 #2
0
ファイル: ActorPhysics.cs プロジェクト: MurrayIRC/frog
    public void ChangeState(PhysicsStateType toState)
    {
        _currentState.Exit();
        ExitStateCallback(_currentStateType);

        _currentStateType = toState;
        _currentState = _stateMap[_currentStateType];

        _currentState.Enter();
        EnterStateCallback(_currentStateType);
    }
コード例 #3
0
ファイル: ActorPhysics.cs プロジェクト: MurrayIRC/frog
 public void RegisterState(PhysicsStateType state, PhysicsState method)
 {
     if (_stateMap.ContainsKey(state))
     {
         _stateMap[state] = method;
     }
     else
     {
         _stateMap.Add(state, method);
     }
 }