-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,966 additions
and
516 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.SceneManagement; | ||
|
||
public class PauseMenu : MonoBehaviour | ||
{ | ||
|
||
public GameObject pausePanel; | ||
|
||
/// <summary> | ||
/// Method <c>ShowPauseMenu</c> pauses the game, and shows the pause menu. | ||
/// </summary> | ||
public void ShowPauseMenu() { | ||
Time.timeScale = 0; | ||
GetComponent<CellInfo>().SetRaycast(false); | ||
pausePanel.SetActive(true); | ||
} | ||
|
||
/// <summary> | ||
/// Method <c>ResumeGame</c> resumes the game. | ||
/// </summary> | ||
public void ResumeGame() { | ||
pausePanel.SetActive(false); | ||
GetComponent<CellInfo>().SetRaycast(true); | ||
Time.timeScale = 1; | ||
} | ||
|
||
/// <summary> | ||
/// Method <c>BackToMenu</c> returns to menu screen | ||
/// </summary> | ||
public void BackToMenu() { | ||
SceneManager.LoadScene("MainMenu"); | ||
} | ||
|
||
/// <summary> | ||
/// Method <c>QuitGame</c> quits the game. | ||
/// </summary> | ||
public void QuitGame() { | ||
Application.Quit(); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.