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

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