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