/** * Hook that the game manager can use if needing to do some general setting * of state */ public POCC.Scenes.Scene sceneChangeHook(POCC.Scenes.Scene scene) { // Do things here if (scene.getSceneType() == SceneType.GAME_OVER) { _tempScenes.Push(_currentScene); return(scene); } else if (_currentScene.getSceneType() == SceneType.GAME_OVER && scene.getSceneType() != SceneType.MAIN_MENU) { POCC.Scenes.Scene tempScene = _tempScenes.Pop(); // TODO: Consider differences if used switchScene(scene) SceneManager.LoadScene(tempScene.getLocation()); return(tempScene); } return(scene); }
public SceneBuilder setLocation(string sceneLocation) { Action startupHooks = _scene.getStartupHooks(); Action teardownHooks = _scene.getTeardownHooks(); _scene = new Scene(_scene.getSceneType(), sceneLocation); _scene.appendStartupHook(startupHooks); _scene.appendTeardownHook(teardownHooks); return(this); }