Example #1
0
    public void Pause()
    {
        if (paused)
        {
            if (sloMo)
            {
                Time.timeScale = 0.35f;
            }
            else
            {
                Time.timeScale = 1;
            }

            spawner.spawning = true;
            paused           = false;
            pauseButton.Pause();
        }
        else
        {
            Time.timeScale   = 0;
            spawner.spawning = false;
            paused           = true;
            pauseButton.Play();
        }
    }