Beispiel #1
0
 public void SetState(GuardMushroomState newState)
 {
     if (_isInit)
     {
         _states[currentState].enabled = false;
         _states[currentState].EndState();
     }
     currentState = newState;
     _states[currentState].BeginState();
     _states[currentState].enabled = true;
     _anim.SetInteger(_animParamID, (int)currentState);
 }
Beispiel #2
0
    public void SetState(GuardMushroomState newState)
    {
        if (_isInit)
        {
            _states[currentState].enabled = false;
            _states[currentState].EndState();
        }
        currentState = newState;
        _states[currentState].BeginState();
        _states[currentState].enabled = true;
        m_anim.SetInteger(_animParamID, (int)currentState);

        /*if (currentState == MonsterState.Dead)
         * {
         *  _isDead = true;
         * }*/
    }