Example #1
0
 void TruckReady()
 {
     pause = false;
     soundManager.PlayFortressClear();
     DifficultyAdjuster();
     UnPause?.Invoke();
 }
Example #2
0
    private IEnumerator LifeLost()
    {
        misses++;
        SetMissText();
        Pause?.Invoke();
        pause = true;


        if (misses == maxMisses)
        {
            gameOver = true;
            pause    = true;
            Pause?.Invoke();
            soundManager.PlayGameOver();
            gameOverText.SetActive(true);
            yield break;
        }
        yield return(new WaitForSeconds(pauseDurationOnCrateBreak));

        UnPause?.Invoke();
        pause = false;
        if (misses == maxMisses - 1)
        {
            soundManager.PlayHurryUp();
        }
    }
        public void OnPause()
        {
            _paused = !_paused;

            if (_paused)
            {
                Pause?.Invoke();
            }
            else
            {
                UnPause?.Invoke();
            }
        }