public void Remove(IGUPState state) { if (!states.Contains(state)) { return; } states.Remove(state); }
public void Add(IGUPState state) { if (states.Contains(state)) { return; } states.Add(state); }
public void TransitionToState(string id) { IGUPState next = Get(id); Debug.Assert(next != null); if (current != null) { current.OnExit(); } current = next; current.OnEnter(); }