private static void SetFeather(InputFrame input, ref GamePadDPad pad, ref GamePadThumbSticks sticks) { pad = new GamePadDPad(ButtonState.Released, ButtonState.Released, ButtonState.Released, ButtonState.Released); Vector2 aim = AnalogHelper.GetFeather(input); sticks = new GamePadThumbSticks(aim, new Vector2(0, 0)); }
private static void DisableRun() { Running = false; /* * if (Recording) { * controller.WriteInputs(); * } */ Recording = false; State = State.None; NextState = State.None; BindingHelper.RestorePlayerBindings(); Celeste.Mod.Core.CoreModule.Settings.UseKeyboardForTextInput = KbTextInput; Controller.ResetSpawn = null; if (ExportSyncData) { EndExport(); ExportSyncData = false; } LibTasHelper.EndExport(); EnforceLegal = false; AllowUnsafeInput = false; AnalogHelper.AnalogModeChange(AnalogueMode.Ignore); Hotkeys.ReleaseAllKeys(); RestoreSettings.TryRestore(); }
private static void LoadStateRoutine() { Controller = savedController.Clone(); Controller.RefreshInputs(false); // Some fields were reset by RefreshInputs(false), so we need restore it. Controller.FfIndex = savedController.FfIndex; for (int i = 0; i < savedController.FastForwards.Count && i < Controller.FastForwards.Count; i++) { if (savedController.FastForwards[i].HasSavedState) { Controller.FastForwards[i].HasSavedState = true; break; } } SetTasState(); AnalogHelper.AnalogModeChange(savedAnalogueMode, savedAnalogueLimit); PlayerStatus = savedPlayerStatus; LastPos = savedLastPos; LastPlayerSeekerPos = savedLastPlayerSeekerPos; UpdateStudio(); }