Beispiel #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();
    }
Beispiel #2
0
 void Start()
 {
     appState      = AppStateFactory.Create(EAppState.GameRun);
     eNextAppState = appState.State;
     appState.OnEnter();
 }