Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Commit bb56795

Browse files
Update UTILITY_SCRIPTS.md
1 parent 3d6d142 commit bb56795

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/UTILITY_SCRIPTS.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ if (loadedScenes)
3939
4040
SceneManager.ChangeScene("Menu");
4141
SceneManager.ChangeScene("Game");
42+
43+
// Change scene to menu scene when ESC is pressed
44+
SceneManager.EscapeToScene("Menu", () => {
45+
// optional code here
46+
});
4247
```
4348

4449
### Game Manager
@@ -49,7 +54,7 @@ GameManager.SpawnPopupMessage(string message);
4954
// spawns a error message in the center of the screen
5055
GameManager.SpawnPopupError(Exception e);
5156

52-
// Exit and do proper clean up (perhaps this should be under SceneManager)
57+
// Exit and do proper clean up
5358
GameManager.Exit();
5459
```
5560

@@ -58,13 +63,6 @@ GameManager.Exit();
5863

5964
### Utils
6065
```cs
61-
// Change scene to menu scene when ESC is pressed
62-
// (perhaps this should be under SceneManager)
63-
64-
Utils.EscapeToScene("Menu", () => {
65-
// optional code here
66-
});
67-
6866
"hello world".ToTitleCase(); // Hello World
6967
"helloWorld".AddSpaceBeforeEachCapitol(); // hello World
7068

0 commit comments

Comments
 (0)