/// <summary> /// 移除一个状态 /// </summary> /// <param Name="state">状态</param> public void RemoveState(IState state) { if (m_State_List.Contains((state))) { m_State_List.Remove(state); if (state.Equals(m_DefaultState) && m_State_List.Count > 0) { m_DefaultState = m_State_List[0]; } if (state.Equals(m_CurrentState)) { m_CurrentState = m_DefaultState; } } }