public void EndCurState() { if (m_CurState) { m_CurState.EndState(); m_CurState = null; SetSpeed(Vector2.zero); } }
public void ChangeState(PetBaseState state) { EndCurState(); m_CurState = state; state.StartState(); }