public void RegisterState(StateKey id, IFsmState <StateKey> state) { if (state == null || m_wasShutdown) { return; } m_registeredStates[id] = state; state.InitializeState(this); }