예제 #1
0
    private IEnumerator WaitForNextRound()
    {
        canOpenPauseMenu = false;
        Time.timeScale   = 0;

        player.CanReadInput = false;

        bonusManager.SetNextFruit();

        var time = soundManager.GetOutroWaitTime();

        yield return(new WaitForSecondsRealtime(time));

        centerText.text  = "READY!";
        centerText.color = Color.yellow;

        levelManager.InitializeEntitiesProperties();
        levelManager.ResetPellets();
        modeManager.OnResetToNextRound();
        player.ResetEatenGhosts();
        player.gameObject.SetActive(true);

        yield return(new WaitForSecondsRealtime(WaitingTimeAfterReset));

        centerText.gameObject.SetActive(false);
        soundManager.PlaySiren();
        player.CanReadInput = true;

        bonusManager.SetFruitWaiting();
        canOpenPauseMenu = true;
        Time.timeScale   = 1;
    }