public void EnterPuzzle(string puzzleName) { resourceService.AsynLoadScene(puzzleName, () => { CloseAllWindow(); GameRoot.ShowTips("", false, false); switch (puzzleName) { case Constants.menuSceneName: try { DialogueManager.instance.ResetAll(); } catch { } titleWindow.SetWindowState(true); audioService.PlayBgMusic(Constants.audioBgMenu, true); break; case Constants.mainSceneName: mainWindow.SetWindowState(true); audioService.PlayBgMusic(Constants.audioBgMain, true); break; case Constants.puzzle01SceneName: puzzle01Window.SetWindowState(true); audioService.PlayBgMusic(Constants.audioBgPuzzle1, true); break; case Constants.puzzle02SceneName: puzzle02Window.SetWindowState(true); audioService.PlayBgMusic(Constants.audioBgPuzzle2, true); break; case Constants.puzzle03SceneName: puzzle03Window.SetWindowState(true); audioService.PlayBgMusic(Constants.audioBgPuzzle3, true); break; case Constants.creditSceneName: creditsWindow.SetWindowState(true); audioService.PlayBgMusic(Constants.audioBgCredit, true); break; case Constants.tutorialSceneName: tutorialWindow.SetWindowState(true); audioService.PlayBgMusic(Constants.audioBgTutorial, true); break; } }); }