/********************* Level Management *********************/ public void StartLevel(Scene scene, LoadSceneMode mode) { if (TransitionManager.GetScreenTransition() != null) { TransitionManager.GetScreenTransition().StartTransitionIn(); } }
// Update is called once per frame void Update() { if (TransitionManager.IsTransitioning()) { if (TransitionManager.GetScreenTransition().FadedOut()) { TransitionManager.GoToDestination(); } } else //if not transitioning { if (VirtualController.PauseButtonPressed()) { if (pauseMenu != null) { if (optionsMenu != null && optionsMenu.open) { optionsMenu.CloseOptionsMenu(); } else { pauseMenu.Toggle(); } } } if (VirtualController.ResetButtonPressed()) { ResetGame(); } if (DEBUG_MODE) { if (Input.GetKeyDown(KeyCode.RightAlt)) { string time = System.DateTime.Now.ToString("yyyy'-'MM'-'dd'--'HH'-'mm'-'ss"); string path = System.IO.Path.Combine(Application.persistentDataPath, "Pictures/screenshot " + time + ".png"); ScreenCapture.CaptureScreenshot(path); Debug.Log("Screen capture saved! " + path); } if (Input.GetKeyDown(KeyCode.Keypad0)) { RenderSettings.ToggleFullscreen(); } if (Input.GetKeyDown(KeyCode.Keypad1)) { RenderSettings.SetRenderScale(1); } if (Input.GetKeyDown(KeyCode.Keypad2)) { RenderSettings.SetRenderScale(2); } if (Input.GetKeyDown(KeyCode.Keypad3)) { RenderSettings.SetRenderScale(3); } if (Input.GetKeyDown(KeyCode.Keypad4)) { RenderSettings.SetRenderScale(4); } } } }