public UIInputState GetNextTransition(UIInputStateAction action) { UIInputStateTransition transition = new UIInputStateTransition(state, action); UIInputState nextState; if (!transitions.TryGetValue(transition, out nextState)) { throw new Exception("Invalid transition: " + state + " -> " + action); } return(nextState); }
public UIInputStateTransition(UIInputState state, UIInputStateAction command) { this.state = state; this.command = command; }
public UIInputState ProcessTransition(UIInputStateAction command) { state = GetNextTransition(command); return(state); }