Skip to content

Commit

Permalink
Fixed #179
Browse files Browse the repository at this point in the history
  • Loading branch information
CMartin2288 committed Apr 21, 2024
1 parent 20a4091 commit 8089943
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Assets/Scripts/Pause Menu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ public class PauseMenu : MonoBehaviour
public GameObject controlsMenu;
public GameObject optionsMenu;
public Vector2 startGravity;

private bool isPaused = false;

// Start is called before the first frame update
void Start()
{
Expand All @@ -23,7 +26,16 @@ void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
Pause();
if(isPaused)
{
isPaused = false;
Resume();
}
else
{
isPaused = true;
Pause();
}
}

controlsMenu.SetActive(Input.GetKey(KeyCode.C));
Expand Down

0 comments on commit 8089943

Please sign in to comment.