Beispiel #1
0
        private static void EnableRun()
        {
            NextState &= ~State.Enable;
            InitializeRun(false);
            BindingHelper.SetTasBindings();
            KbTextInput = Celeste.Mod.Core.CoreModule.Settings.UseKeyboardForTextInput;
            Celeste.Mod.Core.CoreModule.Settings.UseKeyboardForTextInput = false;

            checkHotkeyStarTask = Task.Run(() => {
                while (Running || Hotkeys.HotkeyStart.Pressed)
                {
                    if (FrameLoops > 100)
                    {
                        if (Running && Hotkeys.HotkeyStart.Pressed)
                        {
                            DisableRun();
                        }
                    }
                }

                checkHotkeyStarTask = null;
            });

            RestoreSettings.TryBackup();
        }