public void SwitchContext(IInputContext newContext) { // TODO: Keep track of previous context so SwitchContextToPrevious(); activeContext.OnExit(); newContext.OnEnter(); contextToSwitchTo = newContext; }
void Start() { // Handle switch to default input context contextToSwitchTo = activeContext; activeContext.OnEnter(); activeContext.OnFirstUpdate(); }