Exemplo n.º 1
0
    void Update()
    {
        if (eNextAppState != appState.State)
        {
            if (eNextAppState == EAppState.None)
            {
                Application.Quit();
                return;
            }
            else
            {
                if (appState != null)
                {
                    appState.OnExit();
                }

                appState      = AppStateFactory.Create(eNextAppState);
                eNextAppState = appState.State;
                appState.OnEnter();
            }
        }

        eNextAppState = appState.OnUpdate();

        UIManager.I.Update();
    }