Exemplo n.º 1
0
    // ------------------------------------------------------------------------------------------------

    public void LevelCleared()
    {
        if (bInPlay)
        {
            bInPlay = false;
            goScreenHUD.SetActive(false);
            if (cubeController.GetiLevel() < 5)
            {
                goScreenLevelCleared.SetActive(true);
                bActiveScreenButton = true;
            }
            else
            {
                sfxsrcGameManager.Play();
                goScreenRestart.SetActive(true);
                // Only play the credits if the game is being completed for the first time, otherwise it could be a
                // bit tedious seeing them again (not that anyone would actually be playing over and over again,
                // but still):
                if (!bCompletedGameAtLeastOnce)
                {
                    goScreenCredits.SetActive(true);
                }
                else
                {
                    bActiveScreenButton = true;
                }
            }
            // sfxsrcGameManager.PlayOneShot(sfxclpNames["sfxclpLevelCleared"]);
            sfxsrcGameManager.PlayOneShot(sfxclpLevelCleared);
            if (bNumProjectileFlash)
            {
                EndNumProjectileFlash();
            }
        }
    }