コード例 #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);
 }
コード例 #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;
         * }*/
    }