Exemplo n.º 1
0
    protected StateMachine(int _stateCount)
    {
        mCurrentState = mNextState = INVALID_STATE;

        mUpdateFn = new UpdateFn[_stateCount];
        mEnterFn  = new EnterFn[_stateCount];
        mExitFn   = new ExitFn[_stateCount];
    }
Exemplo n.º 2
0
    protected void SetStateFn(int _state, UpdateFn _update, EnterFn _enter = null, ExitFn _exit = null)
    {
        Debug.Assert(_state != INVALID_STATE);
        Debug.Assert(_state < mUpdateFn.Length);

        mUpdateFn[_state] = _update;
        mEnterFn[_state]  = _enter;
        mExitFn[_state]   = _exit;
    }