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

Commit b9a95a5

Browse files
2 parents 3825d26 + d411ba4 commit b9a95a5

2 files changed

Lines changed: 6 additions & 11 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

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ Tech tree where nodes in tree are positioned automatically via script
2929
### Options
3030
![image](https://user-images.githubusercontent.com/6277739/163117944-e350b70c-aaaa-426f-8719-3c28648d5747.png)
3131

32-
### Popup Menu (coming soon)
33-
In games usually when you press Esc a popup menu comes up asking if you want to go back to the main menu or edit the options
34-
3532
### [Helper Scripts](https://github.com/valkyrienyanko/GodotModules/blob/main/.github/UTILITY_SCRIPTS.md)
3633

3734
## Contributing

0 commit comments

Comments
 (0)