Beispiel #1
0
 void Start()
 {
     // Handle switch to default input context
     contextToSwitchTo = activeContext;
     activeContext.OnEnter();
     activeContext.OnFirstUpdate();
 }
Beispiel #2
0
    void HandleContextSwitch()
    {
        if (contextToSwitchTo == activeContext)
        {
            return;
        }

        activeContext.OnLastUpdate();
        activeContext = contextToSwitchTo;
        activeContext.OnFirstUpdate();
    }