Example #1
0
 // Token: 0x0600343F RID: 13375 RVA: 0x00029825 File Offset: 0x00027A25
 public void ResumeGameplay()
 {
     if (this.GameplaySuspended)
     {
         SuspensionManager.ResumeExcluding(this.m_suspendablesToIgnoreForGameplay);
         this.m_suspendablesToIgnoreForGameplay.Clear();
         this.GameplaySuspended = false;
     }
 }
Example #2
0
 // Token: 0x06000266 RID: 614 RVA: 0x00004004 File Offset: 0x00002204
 public void OnDisable()
 {
     if (this.SuspendOnActivated && this.m_isFrozen)
     {
         this.m_isFrozen = false;
         SuspensionManager.ResumeExcluding(this.m_suspendablesIgnore);
         this.m_suspendablesIgnore.Clear();
     }
 }
Example #3
0
        private static void HandleFrameRates()
        {
            if (HasFlag(tasState, TASState.Enable) && !HasFlag(tasState, TASState.FrameStep) && !HasFlag(tasState, TASState.Record))
            {
                float rsX = XboxControllerInput.GetAxis(XboxControllerInput.Axis.RightStickX);
                if (!HasFlag(tasStateNext, TASState.ChangeSpeed))
                {
                    tasStateNext |= TASState.ChangeSpeed;
                }
                else if (!MoonInput.GetKey(UnityEngine.KeyCode.T) && !MoonInput.GetKey(UnityEngine.KeyCode.R) && !MoonInput.GetKey(UnityEngine.KeyCode.F) /*&&
                                                                                                                                                           * !(XInputDotNetPure.GamePad.GetState(PlayerIndex.One).Buttons.Guide == ButtonState.Pressed)*/)
                {
                    tasStateNext &= ~TASState.ChangeSpeed;
                }

                if (MoonInput.GetKey(UnityEngine.KeyCode.T))
                {
                    currentSpeed = 0.65f;
                    if (isSuspended)
                    {
                        SuspensionManager.ResumeExcluding(suspendables);
                        suspendables.Clear();
                        slowDownFromKB = false;
                        isSuspended    = false;
                    }
                }
                else if (MoonInput.GetKey(UnityEngine.KeyCode.R))
                {
                    currentSpeed = -0.75f;
                    if (isSuspended)
                    {
                        SuspensionManager.ResumeExcluding(suspendables);
                        suspendables.Clear();
                        slowDownFromKB = false;
                        isSuspended    = false;
                    }
                }
                else if (MoonInput.GetKey(UnityEngine.KeyCode.G))
                {
                    currentSpeed = 0;
                    if (isSuspended)
                    {
                        SuspensionManager.ResumeExcluding(suspendables);
                        suspendables.Clear();
                        slowDownFromKB = false;
                        isSuspended    = false;
                    }
                }
                else if ((MoonInput.GetKey(UnityEngine.KeyCode.F)) /*|| (XInputDotNetPure.GamePad.GetState(PlayerIndex.One).Buttons.Guide == ButtonState.Pressed)*/)
                {
                    slowDownFromKB = true;
                }

                if (slowDownFromKB)
                {
                    if (isSuspended)
                    {
                        SuspensionManager.ResumeExcluding(suspendables);
                        suspendables.Clear();
                    }
                    else
                    {
                        SuspensionManager.GetSuspendables(suspendables, Game.UI.Cameras.Current.GameObject);
                        SuspensionManager.SuspendExcluding(suspendables);
                        slowDownFromKB = false;
                    }
                    isSuspended = !isSuspended;
                }

                if (!isSuspended)
                {
                    if (currentSpeed != 0)
                    {
                        rsX += currentSpeed;
                    }

                    if (rsX <= -1.2)
                    {
                        SetFrameRate(1);
                    }
                    else if (rsX <= -1.1)
                    {
                        SetFrameRate(2);
                    }
                    else if (rsX <= -1.0)
                    {
                        SetFrameRate(3);
                    }
                    else if (rsX <= -0.9)
                    {
                        SetFrameRate(4);
                    }
                    else if (rsX <= -0.8)
                    {
                        SetFrameRate(6);
                    }
                    else if (rsX <= -0.7)
                    {
                        SetFrameRate(12);
                    }
                    else if (rsX <= -0.6)
                    {
                        SetFrameRate(16);
                    }
                    else if (rsX <= -0.5)
                    {
                        SetFrameRate(20);
                    }
                    else if (rsX <= -0.4)
                    {
                        SetFrameRate(28);
                    }
                    else if (rsX <= -0.3)
                    {
                        SetFrameRate(36);
                    }
                    else if (rsX <= -0.2)
                    {
                        SetFrameRate(44);
                    }
                    else if (rsX <= 0.2)
                    {
                        SetFrameRate();
                    }
                    else if (rsX <= 0.3)
                    {
                        SetFrameRate(75);
                    }
                    else if (rsX <= 0.4)
                    {
                        SetFrameRate(90);
                    }
                    else if (rsX <= 0.5)
                    {
                        SetFrameRate(105);
                    }
                    else if (rsX <= 0.6)
                    {
                        SetFrameRate(120);
                    }
                    else if (rsX <= 0.7)
                    {
                        SetFrameRate(135);
                    }
                    else if (rsX <= 0.8)
                    {
                        SetFrameRate(150);
                    }
                    else if (rsX <= 0.9)
                    {
                        SetFrameRate(165);
                    }
                    else
                    {
                        SetFrameRate(180);
                    }
                }
            }
            else
            {
                SetFrameRate();
            }
        }