Exemplo n.º 1
0
 // Token: 0x06002629 RID: 9769 RVA: 0x000A5C30 File Offset: 0x000A3E30
 private void Start()
 {
     MainMenuController.wasInMultiplayer = false;
     this.titleMenuScreen.gameObject.SetActive(false);
     this.multiplayerMenuScreen.gameObject.SetActive(false);
     this.settingsMenuScreen.gameObject.SetActive(false);
     this.moreMenuScreen.gameObject.SetActive(false);
     this.desiredMenuScreen = (MainMenuController.wasInMultiplayer ? this.multiplayerMenuScreen : this.titleMenuScreen);
     if (!MainMenuController.eaWarningShown || !MainMenuController.IsMainUserSignedIn())
     {
         MainMenuController.eaWarningShown = true;
         if (!MainMenuController.eaMessageSkipConVar.value)
         {
             this.desiredMenuScreen = this.EAwarningProfileMenu;
         }
     }
     this.currentMenuScreen = this.desiredMenuScreen;
     this.currentMenuScreen.gameObject.SetActive(true);
     this.cameraTransform.position = this.currentMenuScreen.desiredCameraTransform.position;
     this.cameraTransform.rotation = this.currentMenuScreen.desiredCameraTransform.rotation;
     if (this.currentMenuScreen)
     {
         this.currentMenuScreen.OnEnter(this);
     }
 }
Exemplo n.º 2
0
 // Token: 0x0600262C RID: 9772 RVA: 0x000A5D4C File Offset: 0x000A3F4C
 private void Update()
 {
     if (this.IsInLobby() && this.currentMenuScreen != this.multiplayerMenuScreen)
     {
         this.desiredMenuScreen = this.multiplayerMenuScreen;
     }
     if (!MainMenuController.IsMainUserSignedIn() && this.currentMenuScreen != this.EAwarningProfileMenu)
     {
         this.desiredMenuScreen = this.profileMenuScreen;
     }
     if (this.desiredMenuScreen != this.currentMenuScreen)
     {
         this.currentMenuScreen.shouldDisplay = false;
         if (this.currentMenuScreen.IsReadyToLeave())
         {
             this.currentMenuScreen.OnExit(this);
             this.currentMenuScreen.gameObject.SetActive(false);
             this.currentMenuScreen  = this.desiredMenuScreen;
             this.camTransitionTimer = this.camTransitionDuration;
             this.currentMenuScreen.OnEnter(this);
             return;
         }
     }
     else
     {
         this.camTransitionTimer      -= Time.deltaTime;
         this.cameraTransform.position = Vector3.SmoothDamp(this.cameraTransform.position, this.currentMenuScreen.desiredCameraTransform.position, ref this.camSmoothDampPositionVelocity, this.camTranslationSmoothDampTime);
         Vector3 eulerAngles  = this.cameraTransform.eulerAngles;
         Vector3 eulerAngles2 = this.currentMenuScreen.desiredCameraTransform.eulerAngles;
         eulerAngles.x = Mathf.SmoothDampAngle(eulerAngles.x, eulerAngles2.x, ref this.camSmoothDampRotationVelocity.x, this.camRotationSmoothDampTime, float.PositiveInfinity, Time.unscaledDeltaTime);
         eulerAngles.y = Mathf.SmoothDampAngle(eulerAngles.y, eulerAngles2.y, ref this.camSmoothDampRotationVelocity.y, this.camRotationSmoothDampTime, float.PositiveInfinity, Time.unscaledDeltaTime);
         eulerAngles.z = Mathf.SmoothDampAngle(eulerAngles.z, eulerAngles2.z, ref this.camSmoothDampRotationVelocity.z, this.camRotationSmoothDampTime, float.PositiveInfinity, Time.unscaledDeltaTime);
         this.cameraTransform.eulerAngles = eulerAngles;
         if (this.camTransitionTimer <= 0f)
         {
             this.currentMenuScreen.gameObject.SetActive(true);
             this.currentMenuScreen.shouldDisplay = true;
         }
     }
 }