Esempio n. 1
0
 // Token: 0x0600343E RID: 13374 RVA: 0x000D6F78 File Offset: 0x000D5178
 public void SuspendGameplay()
 {
     if (!this.GameplaySuspended)
     {
         Component[] suspendables = Characters.Sein.Controller.Suspendables;
         this.m_suspendablesToIgnoreForGameplay = new HashSet <ISuspendable>(suspendables.Cast <ISuspendable>());
         SuspensionManager.SuspendExcluding(this.m_suspendablesToIgnoreForGameplay);
         this.GameplaySuspended = true;
     }
 }
Esempio n. 2
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();
            }
        }