protected void SetStateHandler(int state, AiStateHandler handler) { if (state > (int)AiStateId.Invalid && state < (int)AiStateId.MaxNum) { if (null != handler) { if (m_Handlers.ContainsKey(state)) { m_Handlers[state] = handler; } else { m_Handlers.Add(state, handler); } } else { m_Handlers.Remove(state); } } }
protected void SetStateHandler(int state, AiStateHandler handler) { if (state > (int)AiStateId.Invalid && state < (int)AiStateId.MaxNum) { if (null != handler) { if (m_Handlers.ContainsKey(state)) m_Handlers[state] = handler; else m_Handlers.Add(state, handler); } else { m_Handlers.Remove(state); } } }