Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        this.currentGameState = SystemState.START;

        uiManager = UIManager.getInstance();
        uiManager.setCurrentGameState(this.currentGameState);
    }
Beispiel #2
0
    public void changeCurrentGameSate()
    {
        switch (this.currentGameState)
        {
        case SystemState.START:
            CreateInGameScene();
            this.currentGameState = SystemState.LOADING;
            break;

        case SystemState.LOADING:
            this.currentGameState = SystemState.INGAME;
            break;

        case SystemState.INGAME:
            DestroyInGameScene();
            this.currentGameState = SystemState.START;
            break;
        }

        uiManager.setCurrentGameState(this.currentGameState);
    }
 public void setCurrentGameState(SystemManager.SystemState newGameState)
 {
     this.currentGameState = newGameState;
     changeActiveUI();
 }