Esempio n. 1
0
    void Update()
    {
        if (startMgr.isGameStart)
        {
            startMgr.isGameStart = false;
            startMgr.SetActive(false);

            inGameMgr.SetActive(true);
            inGameMgr.ReSet();
        }

        if (inGameMgr.isPlayerDead)
        {
            inGameMgr.isPlayerDead = false;
            inGameMgr.SetActive(false);

            gameOverMgr.SetActive(true);
            gameOverMgr.ReSet();
            gameOverMgr.ScoreStart(inGameMgr.GetScore());
        }

        if (gameOverMgr.isGoMainMenu)
        {
            gameOverMgr.isGoMainMenu = false;
            gameOverMgr.SetActive(false);

            startMgr.SetActive(true);
            startMgr.ReSet();
        }

        if (gameOverMgr.isReStart)
        {
            gameOverMgr.isReStart = false;
            gameOverMgr.SetActive(false);

            inGameMgr.SetActive(true);
            inGameMgr.ReSet();
        }
    }