public void ChangeState(IGunState newState) { if (m_primaryState != null) { m_primaryState.EndState(this); } m_primaryState = newState; m_primaryState.StartState(this); }
public bool IsSecondaryState(IGunState state) { return(state == m_secondaryState); }
public void RemoveSecondaryState() { m_secondaryState.EndState(this); m_secondaryState = null; }
public void AddSecondaryState(IGunState secondaryState) { m_secondaryState = secondaryState; m_secondaryState.StartState(this); }