Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. private void PauseGame()
  2. {
  3. this.timesPaused++;
  4. Screen.lockCursor = false;
  5. if (Application.isEditor)
  6. {
  7. Debug.Log("cursor unlocked by PauseGame");
  8. }
  9. Debug.Log("*Pause* called on PauseScreenManager");
  10. this.tutorialPopups.ShowHint(true);
  11. Game.Instance.KillControllerVibrations();
  12. Messenger.Broadcast("PausingGame", MessengerMode.DONT_REQUIRE_LISTENER);
  13. if (!CoherentYoutubeHandler.currentSongIsYoutube || this.videoHasStartedPlaying)
  14. {
  15. Music.Instance.Pause(true);
  16. }
  17. Time.timeScale = 1E-09f;
  18. if (this.contents != null && this.contents.Count > 0)
  19. {
  20. UIGamepadManager.instance.HoverFocusTo(this.contents[0], false);
  21. }
  22. GC.Collect();
  23. }
  24.  
  25. // Token: 0x060040EF RID: 16623 RVA: 0x001BA584 File Offset: 0x001B8784
  26. public void ResumeGame()
  27. {
  28. if (this.timesPaused > 22)
  29. {
  30. this.timesPaused = 0;
  31. this.Restart();
  32. }
  33. else
  34. {
  35. if (!Game.isVR)
  36. {
  37. if (CoherentYoutubeHandler.currentSongIsYoutube && !this.videoHasStartedPlaying)
  38. {
  39. Screen.lockCursor = false;
  40. if (Application.isEditor)
  41. {
  42. Debug.Log("cursor unlocked by ResumeGame because video hasn't started");
  43. }
  44. }
  45. else
  46. {
  47. Screen.lockCursor = true;
  48. if (Application.isEditor)
  49. {
  50. Debug.Log("cursor locked by ResumeGame");
  51. }
  52. }
  53. }
  54. Debug.Log("*Resume* called on PauseScreenManager");
  55. Messenger.Broadcast("ResumingGame", MessengerMode.DONT_REQUIRE_LISTENER);
  56. this.tutorialPopups.ShowHint(false);
  57. Time.timeScale = 1f;
  58. if (!CoherentYoutubeHandler.currentSongIsYoutube || this.videoHasStartedPlaying)
  59. {
  60. Music.Instance.Pause(false);
  61. }
  62. UIGamepadManager.instance.ClearHoverFocus();
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement