Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void PauseGame()
- {
- this.timesPaused++;
- Screen.lockCursor = false;
- if (Application.isEditor)
- {
- Debug.Log("cursor unlocked by PauseGame");
- }
- Debug.Log("*Pause* called on PauseScreenManager");
- this.tutorialPopups.ShowHint(true);
- Game.Instance.KillControllerVibrations();
- Messenger.Broadcast("PausingGame", MessengerMode.DONT_REQUIRE_LISTENER);
- if (!CoherentYoutubeHandler.currentSongIsYoutube || this.videoHasStartedPlaying)
- {
- Music.Instance.Pause(true);
- }
- Time.timeScale = 1E-09f;
- if (this.contents != null && this.contents.Count > 0)
- {
- UIGamepadManager.instance.HoverFocusTo(this.contents[0], false);
- }
- GC.Collect();
- }
- // Token: 0x060040EF RID: 16623 RVA: 0x001BA584 File Offset: 0x001B8784
- public void ResumeGame()
- {
- if (this.timesPaused > 22)
- {
- this.timesPaused = 0;
- this.Restart();
- }
- else
- {
- if (!Game.isVR)
- {
- if (CoherentYoutubeHandler.currentSongIsYoutube && !this.videoHasStartedPlaying)
- {
- Screen.lockCursor = false;
- if (Application.isEditor)
- {
- Debug.Log("cursor unlocked by ResumeGame because video hasn't started");
- }
- }
- else
- {
- Screen.lockCursor = true;
- if (Application.isEditor)
- {
- Debug.Log("cursor locked by ResumeGame");
- }
- }
- }
- Debug.Log("*Resume* called on PauseScreenManager");
- Messenger.Broadcast("ResumingGame", MessengerMode.DONT_REQUIRE_LISTENER);
- this.tutorialPopups.ShowHint(false);
- Time.timeScale = 1f;
- if (!CoherentYoutubeHandler.currentSongIsYoutube || this.videoHasStartedPlaying)
- {
- Music.Instance.Pause(false);
- }
- UIGamepadManager.instance.ClearHoverFocus();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement