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); }
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; * }*/ }