Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Restart Button
Added a restart button, not sure it works unless you hit escape. Will see in the next build
  • Loading branch information
aps16104 committed Feb 23, 2020
1 parent 81f77a8 commit 8ed6219
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions SpaceShooter/Assets/Scripts/PauseMenu.cs
@@ -1,6 +1,10 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;




public class PauseMenu : MonoBehaviour public class PauseMenu : MonoBehaviour
{ {
Expand Down Expand Up @@ -39,4 +43,15 @@ public class PauseMenu : MonoBehaviour
GameIsPaused = true; GameIsPaused = true;
} }


Text health;
public void RestartGame()
{
SceneManager.LoadScene("Main");
HealthScript.healthValue = 100;
ScoreScript.scoreValue = 0;
pauseMenuUI.SetActive(false);
GameIsPaused = false;

}

} }

0 comments on commit 8ed6219

Please sign in to comment.