Scene changes and Bug fixes #336

Merged
glencelow merged 6 commits from PlayerController into main 2023-02-03 22:08:18 +08:00
3 changed files with 5 additions and 3 deletions
Showing only changes of commit 5bf3af2ed2 - Show all commits

View File

@ -4461,7 +4461,7 @@
Scripts: Scripts:
- Type: GameManager - Type: GameManager
Enabled: true Enabled: true
winScene: 92009475 winScene: 86098106
loseScene: 91685359 loseScene: 91685359
currGameState: 0 currGameState: 0
totalItemCount: 0 totalItemCount: 0

View File

@ -66,4 +66,5 @@
Components: ~ Components: ~
Scripts: Scripts:
- Type: MainMenu - Type: MainMenu
Enabled: true Enabled: true
sceneID: 96668835

View File

@ -3,6 +3,7 @@ using SHADE;
public class MainMenu : Script public class MainMenu : Script
{ {
public uint sceneID;
protected override void awake() protected override void awake()
{ {
Audio.PlayBGMOnce2D("event:/Music/main_menu"); Audio.PlayBGMOnce2D("event:/Music/main_menu");
@ -17,7 +18,7 @@ public class MainMenu : Script
if (Input.GetKeyUp(Input.KeyCode.Space)) if (Input.GetKeyUp(Input.KeyCode.Space))
{ {
Audio.PlaySFXOnce2D("event:/UI/success"); Audio.PlaySFXOnce2D("event:/UI/success");
SceneManager.ChangeScene(86098106); SceneManager.ChangeScene(sceneID);
Audio.StopAllSounds(); Audio.StopAllSounds();
} }