public void SetState(StateID stateID) { if (!states.ContainsKey (stateID)) { return; } if (currentState != null) { currentState.Leave(); } currentState = states [stateID]; currentState.Enter (); }
public void AddState(StateID stateID, StateParent state) { states.Add (stateID, state); }