This repository was archived by the owner on Sep 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,11 @@ if (loadedScenes)
3939
4040SceneManager .ChangeScene (" Menu" );
4141SceneManager .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
5055GameManager .SpawnPopupError (Exception e );
5156
52- // Exit and do proper clean up (perhaps this should be under SceneManager)
57+ // Exit and do proper clean up
5358GameManager .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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments