Exemplo n.º 1
0
    // Play/Pause the scene
    public void Pause()
    {
        if (!isPaused)
        {
            Time.timeScale = 0;
            isPaused       = true;
        }
        else
        {
            Time.timeScale = 1;
            isPaused       = false;
        }

        PauseButton button = pauseButton.GetComponent("PauseButton") as PauseButton;

        button.ChangeImage();
    }