Beispiel #1
0
        private static void RespawnSpeed(Engine.orig_Update orig, Monocle.Engine self, GameTime time)
        {
            orig(self, time);

            if (!SpeedrunToolModule.Settings.Enabled || SpeedrunToolModule.Settings.RespawnSpeed == 1)
            {
                return;
            }

            if (Monocle.Engine.Scene is not Level level)
            {
                return;
            }

            if (level.Paused)
            {
                return;
            }

            Player player = level.GetPlayer();

            // 加速复活过程
            if (player == null || player.StateMachine.State == Player.StIntroRespawn)
            {
                for (int i = 1; i < SpeedrunToolModule.Settings.RespawnSpeed; i++)
                {
                    orig(self, time);
                }
            }
        }
Beispiel #2
0
        private static void RespawnSpeed(Engine.orig_Update orig, Monocle.Engine self, GameTime time)
        {
            orig(self, time);

            if (!SpeedrunToolModule.Settings.Enabled || SpeedrunToolModule.Settings.RespawnSpeed == 1)
            {
                return;
            }

            if (!(Monocle.Engine.Scene is Level level))
            {
                return;
            }

            Player player = level.Entities.FindFirst <Player>();

            // level 场景中 player == null 代表人物死亡
            // if player is null, Madeline is dead
            if (player != null && player.StateMachine.State == Player.StIntroRespawn || player == null)
            {
                for (int i = 1; i < SpeedrunToolModule.Settings.RespawnSpeed; i++)
                {
                    orig(self, time);
                }
            }
        }
Beispiel #3
0
 //Disable enabled to stop the webhook thread
 private void Engine_OnExiting(Engine.orig_OnExiting orig, Monocle.Engine self, object sender, EventArgs args)
 {
     Settings.ReconnectOnDisconnect = false;
     Settings.StopThread();
 }