diff --git a/Library/Common/Network/Socket.cs b/Library/Common/Network/Socket.cs index aa6ff59..9d6b3e1 100644 --- a/Library/Common/Network/Socket.cs +++ b/Library/Common/Network/Socket.cs @@ -130,8 +130,11 @@ namespace Milimoe.FunGame.Core.Library.Common.Network private void StartSendingHeartBeat() { - _SendingHeartBeat = true; - SendingHeartBeatTask = Task.Factory.StartNew(SendHeartBeat); + if (!FunGameInfo.FunGame_DebugMode) + { + _SendingHeartBeat = true; + SendingHeartBeatTask = Task.Factory.StartNew(SendHeartBeat); + } } private void StopReceiving() diff --git a/Library/Constant/FunGameInfo.cs b/Library/Constant/FunGameInfo.cs index 34a25a1..0d7009b 100644 --- a/Library/Constant/FunGameInfo.cs +++ b/Library/Constant/FunGameInfo.cs @@ -13,6 +13,12 @@ public const string FunGame_CopyRight = @"©2023 Milimoe. 米粒的糖果屋"; + /// + /// 添加-debug启动项将开启DebugMode(仅适用于Desktop或Console) + /// 目前支持禁用心跳检测功能 + /// + public static bool FunGame_DebugMode { get; set; } = false; + private const string FunGame_Core = "FunGame Core"; private const string FunGame_Core_Api = "FunGame Core Api"; private const string FunGame_Console = "FunGame Console";