public TASInput(int frames) { this.Frames = frames; this.Cancel = Core.Input.Cancel.IsPressed; this.Action = Core.Input.ActionButtonA.IsPressed; this.Dash = Core.Input.RightShoulder.IsPressed; this.Grenade = Core.Input.LeftShoulder.IsPressed; this.Jump = Core.Input.Jump.IsPressed; this.Save = Core.Input.SoulFlame.IsPressed; this.Attack = Core.Input.SpiritFlame.IsPressed; this.Bash = Core.Input.Bash.IsPressed; this.Start = Core.Input.Start.IsPressed; this.Select = Core.Input.Select.IsPressed; this.ChargeJump = Core.Input.ChargeJump.IsPressed; this.Glide = Core.Input.Glide.IsPressed; float dp = Core.Input.HorizontalDigiPad; float ana = Core.Input.HorizontalAnalogLeft; this.XAxis = dp < -0.1f ? -1 : (ana < -0.04f ? ana : (dp > 0.1f ? 1 : (ana > 0.04f ? ana : 0))); dp = Core.Input.VerticalDigiPad; ana = Core.Input.VerticalAnalogLeft; this.YAxis = dp < -0.1f ? -1 : (ana < -0.04f ? ana : (dp > 0.1f ? 1 : (ana > 0.04f ? ana : 0))); this.UI = (MoonInput.GetKey(UnityEngine.KeyCode.LeftAlt) || MoonInput.GetKey(UnityEngine.KeyCode.RightAlt)) && MoonInput.GetKeyDown(UnityEngine.KeyCode.U); if (Core.Input.CursorMoved) { UnityEngine.Vector2 vector = Core.Input.CursorPosition; this.MouseX = vector.x; this.MouseY = vector.y; } }
// Token: 0x060037BA RID: 14266 public bool IsPressed() { if (this.ActionBind) { return(this.Action.Pressed); } return(MoonInput.GetKey(this.Key)); }
// Token: 0x06003439 RID: 13369 RVA: 0x000297AF File Offset: 0x000279AF public void Update() { Randomizer.Update(); if ((MoonInput.GetKey(KeyCode.LeftAlt) || MoonInput.GetKey(KeyCode.RightAlt)) && MoonInput.GetKeyDown(KeyCode.U)) { UI.SeinUI.ShowUI = true; SeinUI.DebugHideUI = !SeinUI.DebugHideUI; } }
public TASInput(int frames) { this.KBDown = false; this.KBUp = false; this.SpamAction = false; this.Slowdown = false; this.AutoRotateFix = false; this.SeinPos = false; this.Frames = frames; this.XP = -1; this.EN = -1; this.HP = -1; this.Random = -1; this.Copy = -1; this.SkillTree = -1; this.EntityHP = -1; this.Esc = Core.Input.Cancel.IsPressed; this.Action = Core.Input.ActionButtonA.IsPressed; this.Dash = Core.Input.RightShoulder.IsPressed; this.Grenade = Core.Input.LeftShoulder.IsPressed; this.Jump = Core.Input.Jump.IsPressed; this.Save = Core.Input.SoulFlame.IsPressed; this.Fire = Core.Input.SpiritFlame.IsPressed; this.Bash = Core.Input.Bash.IsPressed; this.Start = Core.Input.Start.IsPressed; this.Select = Core.Input.Select.IsPressed; this.ChargeJump = Core.Input.ChargeJump.IsPressed; this.Glide = Core.Input.Glide.IsPressed; float dp = Core.Input.HorizontalDigiPad; float ana = Core.Input.HorizontalAnalogLeft; this.XAxis = dp < -0.1f ? -1 : (ana < -0.04f ? ana : (dp > 0.1f ? 1 : (ana > 0.04f ? ana : 0))); dp = Core.Input.VerticalDigiPad; ana = Core.Input.VerticalAnalogLeft; this.YAxis = dp < -0.1f ? -1 : (ana < -0.04f ? ana : (dp > 0.1f ? 1 : (ana > 0.04f ? ana : 0))); this.UI = (MoonInput.GetKey(KeyCode.LeftAlt) || MoonInput.GetKey(UnityEngine.KeyCode.RightAlt)) && MoonInput.GetKeyDown(UnityEngine.KeyCode.U); if (Core.Input.CursorMoved) { Vector2 vector = Core.Input.CursorPosition; this.MouseX = vector.x; this.MouseY = vector.y; } else { this.MouseX = -1; this.MouseY = -1; } this.SaveSlot = -1; this.SpamAction = false; }
private static void CheckControls() { char kp = currentKeyPress; float rsX = XboxControllerInput.GetAxis(XboxControllerInput.Axis.RightStickX); bool rhtTrg = XboxControllerInput.GetButton(XboxControllerInput.Button.RightTrigger); bool lftTrg = XboxControllerInput.GetButton(XboxControllerInput.Button.LeftTrigger); bool lftStick = XboxControllerInput.GetButton(XboxControllerInput.Button.LeftStick); bool dpU = XboxControllerInput.GetAxis(XboxControllerInput.Axis.DpadY) > 0.1f; bool dpD = XboxControllerInput.GetAxis(XboxControllerInput.Axis.DpadY) < -0.1f; bool kbPlay = MoonInput.GetKey(KeyCode.LeftBracket); bool kbRec = MoonInput.GetKey(KeyCode.Backspace) && (MoonInput.GetKey(KeyCode.LeftShift) || MoonInput.GetKey(KeyCode.RightShift)); bool kbStop = MoonInput.GetKey(KeyCode.Backslash) || kp == '\\'; bool kbDebug = MoonInput.GetKey(KeyCode.F8); bool kbReload = MoonInput.GetKey(KeyCode.Quote) || kp == '\''; bool kbRerec = MoonInput.GetKey(KeyCode.Backspace) && (MoonInput.GetKey(KeyCode.LeftControl) || MoonInput.GetKey(KeyCode.RightControl)); if (rhtTrg || lftTrg || kbPlay || kbRec || kbStop || kbDebug || kbReload || kbRerec) { if (!HasFlag(tasState, TASState.Enable) && ((lftStick && rhtTrg && lftTrg) || kbPlay)) { tasStateNext |= TASState.Enable; } else if (!HasFlag(tasState, TASState.Rerecord) && kbRerec) { tasStateNext |= TASState.Rerecord; } else if (HasFlag(tasState, TASState.Enable) && (dpD || kbStop)) { DisableRun(); } else if (!HasFlag(tasState, TASState.Reload) && HasFlag(tasState, TASState.Enable) && !HasFlag(tasState, TASState.Record) && (dpU || kbReload)) { tasStateNext |= TASState.Reload; } else if (!HasFlag(tasState, TASState.Enable) && !HasFlag(tasState, TASState.Record) && kbRec) { tasStateNext |= TASState.Record; } else if (!HasFlag(tasState, TASState.Enable) && !HasFlag(tasState, TASState.Record) && kbDebug) { tasStateNext |= TASState.OpenDebug; } } if (!rhtTrg && !kbPlay && !kbRec && !kbDebug && !kbReload && !kbRerec) { if (HasFlag(tasStateNext, TASState.Enable)) { ClearKeyPress(true); EnableRun(); } else if (HasFlag(tasStateNext, TASState.Record)) { RecordRun(); } else if (HasFlag(tasStateNext, TASState.Rerecord)) { RerecordRun(); } else if (HasFlag(tasStateNext, TASState.Reload)) { ReloadRun(); } else if (HasFlag(tasStateNext, TASState.OpenDebug)) { tasStateNext &= ~TASState.OpenDebug; CheatsHandler.Instance.ActivateDebugMenu(); } } }
// Token: 0x06003743 RID: 14147 RVA: 0x000E06A0 File Offset: 0x000DE8A0 public static void Update() { if (Characters.Sein && !Characters.Sein.IsSuspended) { Characters.Sein.Mortality.Health.GainHealth((float)RandomizerBonus.HealthRegeneration() * (Characters.Sein.PlayerAbilities.HealthEfficiency.HasAbility ? 0.0016f : 0.0008f)); Characters.Sein.Energy.Gain((float)RandomizerBonus.EnergyRegeneration() * (Characters.Sein.PlayerAbilities.EnergyEfficiency.HasAbility ? 0.0003f : 0.0002f)); if (Randomizer.ForceTrees && Scenes.Manager.CurrentScene != null && Scenes.Manager.CurrentScene.Scene == "catAndMouseResurrectionRoom" && RandomizerBonus.SkillTreeProgression() < 10) { Characters.Sein.Position = new Vector3(20f, 105f); } if (Randomizer.Chaos) { RandomizerChaosManager.Update(); } } if (MoonInput.GetKey(KeyCode.LeftAlt) || MoonInput.GetKey(KeyCode.RightAlt)) { if (MoonInput.GetKeyDown(RandomizerRebinding.ReplayMessage)) { Randomizer.playLastMessage(); return; } if (MoonInput.GetKeyDown(RandomizerRebinding.ReturnToStart) && Characters.Sein) { Randomizer.returnToStart(); return; } if (MoonInput.GetKeyDown(RandomizerRebinding.ReloadSeed)) { Randomizer.initialize(); Randomizer.showSeedInfo(); return; } if (MoonInput.GetKeyDown(RandomizerRebinding.ShowProgress) && Characters.Sein) { Randomizer.showProgress(); return; } if (MoonInput.GetKeyDown(RandomizerRebinding.ToggleChaos) && Characters.Sein) { if (Randomizer.Chaos) { Randomizer.showChaosMessage("Chaos deactivated"); Randomizer.Chaos = false; RandomizerChaosManager.ClearEffects(); return; } Randomizer.showChaosMessage("Chaos activated"); Randomizer.Chaos = true; return; } else if (MoonInput.GetKeyDown(RandomizerRebinding.ChaosVerbosity) && Randomizer.Chaos) { Randomizer.ChaosVerbose = !Randomizer.ChaosVerbose; if (Randomizer.ChaosVerbose) { Randomizer.showChaosMessage("Chaos messages enabled"); return; } Randomizer.showChaosMessage("Chaos messages disabled"); return; } else if (MoonInput.GetKeyDown(RandomizerRebinding.ForceChaosEffect) && Randomizer.Chaos && Characters.Sein) { RandomizerChaosManager.SpawnEffect(); return; } } }
public static void Update() { PracticeManager.UpdateMessages(); long currentTicks = DateTime.Now.Ticks; long tickDelta = currentTicks - PracticeManager.LastTick - 166667L; PracticeManager.LastTick = currentTicks; if (PracticeManager.Countdown >= 0) { PracticeManager.Countdown--; if (Characters.Sein) { Characters.Sein.Position = PracticeManager.StartPosition; } if (PracticeManager.Countdown == 0) { PracticeManager.Start(); } } if (PracticeManager.Running) { if (PracticeManager.FrameCount == 1) { foreach (Core.Input.InputButtonProcessor button in Core.Input.Buttons) { if (button != Core.Input.AnyStart) { button.IsPressed = false; button.WasPressed = false; } } } PracticeManager.ExtraTicks -= tickDelta; if (PracticeManager.ExtraTicks > 166667L) { PracticeManager.ExtraFrames += 1; PracticeManager.ExtraTicks -= 166667L; } if (PracticeManager.ExtraTicks < -166667L) { PracticeManager.LagFrames += 1; PracticeManager.ExtraTicks += 166667L; } if (tickDelta > 166667L) { PracticeManager.DroppedFrames += (int)(tickDelta / 166667L); } PracticeManager.MaxDelta = Math.Max(PracticeManager.MaxDelta, tickDelta); PracticeManager.FrameCount++; PracticeManager.CheckEnd(); } if (MoonInput.GetKey(KeyCode.LeftAlt) || MoonInput.GetKey(KeyCode.RightAlt)) { if (MoonInput.GetKeyDown(KeyCode.Keypad5) || MoonInput.GetKeyDown(KeyCode.Semicolon)) { PracticeManager.SetStart(); } if (MoonInput.GetKeyDown(KeyCode.R)) { PracticeManager.QueueStart(); } if (MoonInput.GetKeyDown(KeyCode.K)) { PracticeManager.Initialize(); } if (MoonInput.GetKeyDown(KeyCode.I)) { PracticeManager.ShowPositionInfo(); } if (MoonInput.GetKeyDown(KeyCode.T)) { PracticeManager.MessageInQueue = 2; } if (MoonInput.GetKeyDown(KeyCode.E)) { PracticeManager.ShowMessage(PracticeManager.GenerateEfficiencyStats()); } if (MoonInput.GetKeyDown(KeyCode.Keypad1) || MoonInput.GetKeyDown(KeyCode.Comma)) { PracticeManager.SetEnd(1); } if (MoonInput.GetKeyDown(KeyCode.Keypad2) || MoonInput.GetKeyDown(KeyCode.Period)) { PracticeManager.SetEnd(2); } if (MoonInput.GetKeyDown(KeyCode.Keypad3) || MoonInput.GetKeyDown(KeyCode.Slash)) { PracticeManager.SetEnd(3); } if (MoonInput.GetKeyDown(KeyCode.Keypad4) || MoonInput.GetKeyDown(KeyCode.L)) { PracticeManager.SetEnd(4); } if (MoonInput.GetKeyDown(KeyCode.Keypad6) || MoonInput.GetKeyDown(KeyCode.Quote)) { PracticeManager.SetEnd(6); } if (MoonInput.GetKeyDown(KeyCode.Keypad7) || MoonInput.GetKeyDown(KeyCode.P)) { PracticeManager.SetEnd(7); } if (MoonInput.GetKeyDown(KeyCode.Keypad8) || MoonInput.GetKeyDown(KeyCode.LeftBracket)) { PracticeManager.SetEnd(8); } if (MoonInput.GetKeyDown(KeyCode.Keypad9) || MoonInput.GetKeyDown(KeyCode.RightBracket)) { PracticeManager.SetEnd(9); } } }
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(); } }
private static void CheckControls() { float rsX = XboxControllerInput.GetAxis(XboxControllerInput.Axis.RightStickX); bool lftShd = XboxControllerInput.GetButton(XboxControllerInput.Button.LeftTrigger); bool rhtShd = XboxControllerInput.GetButton(XboxControllerInput.Button.RightTrigger); bool dpU = XboxControllerInput.GetAxis(XboxControllerInput.Axis.DpadY) > 0.1f; bool dpD = XboxControllerInput.GetAxis(XboxControllerInput.Axis.DpadY) < -0.1f; // bool guide = XInputDotNetPure.GamePad.GetState(PlayerIndex.One).Buttons.Guide == ButtonState.Pressed; bool kbPlay = MoonInput.GetKey(UnityEngine.KeyCode.B); bool kbRec = MoonInput.GetKey(UnityEngine.KeyCode.N); bool kbStop = MoonInput.GetKey(UnityEngine.KeyCode.J); bool kbDebug = MoonInput.GetKey(UnityEngine.KeyCode.F8); bool shift = MoonInput.GetKey(UnityEngine.KeyCode.LeftShift) || MoonInput.GetKey(UnityEngine.KeyCode.RightShift); bool kbRerec = MoonInput.GetKey(UnityEngine.KeyCode.Backspace); if ((lftShd && rhtShd) || kbPlay || kbRec || kbStop || kbDebug || kbRerec) { if (!HasFlag(tasState, TASState.Enable) && (XboxControllerInput.GetButton(XboxControllerInput.Button.RightStick) || (kbPlay && !shift))) { tasStateNext |= TASState.Enable; } else if (!HasFlag(tasState, TASState.Rerecord) && (kbRerec)) { tasStateNext |= TASState.Rerecord; } else if (HasFlag(tasState, TASState.Enable) && (dpD || kbStop)) { DisableRun(); } else if (!HasFlag(tasState, TASState.Reload) && HasFlag(tasState, TASState.Enable) && !HasFlag(tasState, TASState.Record) && (dpU || (kbPlay && shift))) { tasStateNext |= TASState.Reload; } else if (!HasFlag(tasState, TASState.Record) && (XboxControllerInput.GetButton(XboxControllerInput.Button.LeftStick) || kbRec)) { tasStateNext |= TASState.Record; } else if (!HasFlag(tasState, TASState.Record) && kbDebug) { tasStateNext |= TASState.OpenDebug; } } if (!lftShd && !rhtShd && !kbPlay && !kbRec && !kbDebug) { if (HasFlag(tasStateNext, TASState.Enable)) { EnableRun(); } else if (HasFlag(tasStateNext, TASState.Record)) { RecordRun(); } else if (HasFlag(tasStateNext, TASState.Rerecord)) { RerecordRun(); } else if (HasFlag(tasStateNext, TASState.Reload)) { ReloadRun(); } else if (HasFlag(tasStateNext, TASState.OpenDebug)) { tasStateNext &= ~TASState.OpenDebug; CheatsHandler.Instance.ActivateDebugMenu(); } } }
// Token: 0x06000EB4 RID: 3764 RVA: 0x0005B634 File Offset: 0x00059834 private bool IsAnyStartPressed() { return(XboxControllerInput.GetButton(XboxControllerInput.Button.Start, -1) || XboxControllerInput.GetButton(XboxControllerInput.Button.ButtonA, -1) || XboxControllerInput.GetButton(XboxControllerInput.Button.ButtonB, -1) || XboxControllerInput.GetButton(XboxControllerInput.Button.ButtonX, -1) || XboxControllerInput.GetButton(XboxControllerInput.Button.ButtonY, -1) || MoonInput.GetKey(KeyCode.Space) || MoonInput.GetKey(KeyCode.X) || MoonInput.GetKey(KeyCode.Mouse0) || MoonInput.GetKey(KeyCode.Return) || MoonInput.GetKey(KeyCode.Escape) || MoonInput.anyKey); }