diff --git a/locals/Log.csv b/locals/Log.csv index 995e012..4f67a6c 100644 --- a/locals/Log.csv +++ b/locals/Log.csv @@ -47,4 +47,9 @@ log_state_machine_does_not_specify_context,状态机没有指定上下文。,The log_state_processor_already_registered,状态处理器已经注册。,State processor already registered.,ステートプロセッサは既に登録されています。 log_state_machine_does_not_specify_processor,状态机没有指定处理器。,The state machine does not specify a processor.,ステートマシンはプロセッサを指定していません。 log_try_to_set_the_same_state,尝试设置相同的状态。,Try to set the same state.,同じ状態を設定しようとしています。 -log_state_machine_does_not_specify_active_processor,状态机没有指定活动处理器。,The state machine does not specify an active processor.,ステートマシンはアクティブプロセッサを指定していません。 \ No newline at end of file +log_state_machine_does_not_specify_active_processor,状态机没有指定活动处理器。,The state machine does not specify an active processor.,ステートマシンはアクティブプロセッサを指定していません。 +log_no_points,巡逻路径没有点。,The patrol path has no points.,巡回路にポイントがありません。 +log_patrol_to_next_point,下一个点{0},当前位置{1},偏移量{2},距离为{3}。,"Next point {0}, current position {1}, offset {2}, distance {3}.",次のポイント{0}、現在の位置{1}、オフセット{2}、距離{3}。 +log_patrol_arrival_point,到达巡逻点{0}。,Arrival at patrol point {0}.,巡回ポイント{0}に到着します。 +log_patrol_origin_position,巡逻路径的起始位置是{0}。,The starting position of the patrol path is {0}.,巡回路の開始位置は{0}です。 +log_patrol_not_on_floor,不能将初始路径设置在空中。,The initial path cannot be set in the air.,初期パスを空中に設定できません。 \ No newline at end of file diff --git a/prefab/entitys/DelivererOfDarkMagic.tscn b/prefab/entitys/DelivererOfDarkMagic.tscn index 333178a..5d7f278 100644 --- a/prefab/entitys/DelivererOfDarkMagic.tscn +++ b/prefab/entitys/DelivererOfDarkMagic.tscn @@ -79,3 +79,4 @@ collision_mask = 68 shape = SubResource("CircleShape2D_c61vr") [node name="NavigationAgent2D" type="NavigationAgent2D" parent="."] +debug_enabled = true diff --git a/prefab/roomTemplates/dungeon/horizontalCorridor.tscn b/prefab/roomTemplates/dungeon/horizontalCorridor.tscn index a9dbf95..c4849c1 100644 --- a/prefab/roomTemplates/dungeon/horizontalCorridor.tscn +++ b/prefab/roomTemplates/dungeon/horizontalCorridor.tscn @@ -62,7 +62,7 @@ position = Vector2(193, 15) shape = SubResource("RectangleShape2D_7tsse") [node name="Marker2D" type="Marker2D" parent="."] -position = Vector2(220, 103) +position = Vector2(260, 87) script = ExtResource("2_wamhd") metadata/ResPath = "res://prefab/entitys/DelivererOfDarkMagic.tscn" diff --git a/prefab/roomTemplates/dungeon/horizontalCorridorWithSewer.tscn b/prefab/roomTemplates/dungeon/horizontalCorridorWithSewer.tscn index 376a8a1..ee0997a 100644 --- a/prefab/roomTemplates/dungeon/horizontalCorridorWithSewer.tscn +++ b/prefab/roomTemplates/dungeon/horizontalCorridorWithSewer.tscn @@ -63,7 +63,7 @@ position = Vector2(0, 17) shape = SubResource("RectangleShape2D_131jn") [node name="Marker2D" type="Marker2D" parent="."] -position = Vector2(183, 72) +position = Vector2(237, 69) script = ExtResource("2_7q101") metadata/ResPath = "res://prefab/entitys/DelivererOfDarkMagic.tscn" diff --git a/scripts/character/AiCharacter.cs b/scripts/character/AiCharacter.cs index 3df1831..f3de832 100644 --- a/scripts/character/AiCharacter.cs +++ b/scripts/character/AiCharacter.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using ColdMint.scripts.debug; using ColdMint.scripts.stateMachine; using Godot; @@ -42,7 +43,6 @@ public sealed partial class AiCharacter : CharacterTemplate /// private RayCast2D? _attackObstacleDetection; - private float _horizontalMoveVelocity; /// /// Navigation agent @@ -96,7 +96,12 @@ public sealed partial class AiCharacter : CharacterTemplate protected override void HookPhysicsProcess(ref Vector2 velocity, double delta) { StateMachine?.Execute(); - velocity.X = _horizontalMoveVelocity; + if (NavigationAgent2D != null && IsOnFloor()) + { + var nextPathPosition = NavigationAgent2D.GetNextPathPosition(); + var direction = (nextPathPosition - GlobalPosition).Normalized(); + velocity = direction * Config.CellSize * Speed; + } } private void EnterTheAttackArea(Node node) @@ -109,58 +114,22 @@ public sealed partial class AiCharacter : CharacterTemplate _nodesInTheAttackRange?.Remove(node); } + /// - /// Move left - /// 向左移动 + /// Set target location + /// 设置目标位置 /// - public void MoveLeft() + /// + public void SetTargetPosition(Vector2 targetPosition) { - if (!IsOnFloor()) + if (NavigationAgent2D == null) { return; } - _horizontalMoveVelocity = -Speed * Config.CellSize; + NavigationAgent2D.TargetPosition = targetPosition; } - /// - /// Move right - /// 向右移动 - /// - public void MoveRight() - { - if (!IsOnFloor()) - { - return; - } - - _horizontalMoveVelocity = Speed; - } - - /// - /// Rotor - /// 转头 - /// - public void Rotor() - { - FacingLeft = !FacingLeft; - Flip(); - //Change the direction of the wall detection - //改变墙壁检测的方向 - if (_wallDetection == null) return; - var newDirection = _wallDetectionOrigin; - newDirection.X = FacingLeft ? -_wallDetectionOrigin.X : _wallDetectionOrigin.X; - _wallDetection.TargetPosition = newDirection; - } - - /// - /// stop moving - /// 停止移动 - /// - public void StopMoving() - { - _horizontalMoveVelocity = 0; - } public override void _ExitTree() { diff --git a/scripts/character/CharacterTemplate.cs b/scripts/character/CharacterTemplate.cs index 573bde9..dba931d 100644 --- a/scripts/character/CharacterTemplate.cs +++ b/scripts/character/CharacterTemplate.cs @@ -27,6 +27,7 @@ public partial class CharacterTemplate : CharacterBody2D // Get the gravity from the project settings to be synced with RigidBody nodes. // 从项目设置中获取与RigidBody节点同步的重力。 protected float Gravity = ProjectSettings.GetSetting("physics/2d/default_gravity").AsSingle(); + /// /// How fast the character moves /// 角色的移动速度 @@ -532,11 +533,13 @@ public partial class CharacterTemplate : CharacterBody2D if (damageTemplate.Attacker is CharacterTemplate characterTemplate && !string.IsNullOrEmpty(characterTemplate.CharacterName)) { - LogCat.LogWithFormat("death_info", CharacterName, characterTemplate.CharacterName); + LogCat.LogWithFormat("death_info", LogCat.LogLabel.Default, CharacterName, + characterTemplate.CharacterName); } else { - LogCat.LogWithFormat("death_info", CharacterName, damageTemplate.Attacker.Name); + LogCat.LogWithFormat("death_info", LogCat.LogLabel.Default, CharacterName, + damageTemplate.Attacker.Name); } } @@ -734,6 +737,7 @@ public partial class CharacterTemplate : CharacterBody2D { return; } + //We continuously set the position of the items to prevent them from changing as we zoom in and out of the window. //我们持续设置物品的位置,为了防止放大缩小窗口时物品位置的变化。 if (_currentItem != null) diff --git a/scripts/character/Player.cs b/scripts/character/Player.cs index 73485c6..bceef92 100644 --- a/scripts/character/Player.cs +++ b/scripts/character/Player.cs @@ -50,7 +50,8 @@ public partial class Player : CharacterTemplate { base._Ready(); CharacterName = TranslationServerUtils.Translate("default_player_name"); - LogCat.LogWithFormat("player_spawn_debug", ReadOnlyCharacterName, GlobalPosition); + LogCat.LogWithFormat("player_spawn_debug", LogCat.LogLabel.Default, ReadOnlyCharacterName, + GlobalPosition); _floatLabelPackedScene = GD.Load("res://prefab/ui/FloatLabel.tscn"); _parabola = GetNode("Parabola"); _platformDetectionRayCast2D = GetNode("PlatformDetectionRayCast"); diff --git a/scripts/debug/LogCat.cs b/scripts/debug/LogCat.cs index a991a60..a2508f7 100644 --- a/scripts/debug/LogCat.cs +++ b/scripts/debug/LogCat.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Text; using ColdMint.scripts.utils; using Godot; @@ -7,6 +8,22 @@ namespace ColdMint.scripts.debug; public static class LogCat { + public static class LogLabel + { + /// + /// Default log label + /// 默认的日志标签 + /// + public const string Default = "Default"; + + /// + /// PatrolStateProcessor + /// 巡逻状态处理器 + /// + public const string PatrolStateProcessor = "PatrolStateProcessor"; + } + + /// /// Information log level /// 信息日志等级 @@ -49,8 +66,65 @@ public static class LogCat private static readonly StringBuilder StringBuilder = new StringBuilder(); + /// + /// Disabled log label + /// 禁用的日志标签 + /// + private static HashSet DisabledLogLabels { get; } = []; + - private static StringBuilder HandleMessage(int level, string message) + /// + /// Disable log Label + /// 禁用某个日志标签 + /// + /// + ///label + ///标签名称 + /// + /// + ///Returns whether the function is disabled successfully + ///返回是否禁用成功 + /// + public static bool DisableLogLabel(string label) + { + return DisabledLogLabels.Add(label); + } + + /// + /// Whether a label is enabled + /// 某个标签是否处于启用状态 + /// + /// + ///label + ///标签名称 + /// + /// + ///Whether enabled + ///是否处于启用 + /// + public static bool IsEnabledLogLabel(string label) + { + return !DisabledLogLabels.Contains(label); + } + + /// + /// EnableLogLabel + /// 启用某个日志标签 + /// + /// + ///label + /// 标签名称 + /// + /// + ///Returns whether the function is enabled successfully + ///返回是否启用成功 + /// + public static bool EnableLogLabel(string label) + { + return DisabledLogLabels.Remove(label); + } + + private static StringBuilder HandleMessage(int level, string message, string label) { StringBuilder.Clear(); switch (level) @@ -69,7 +143,9 @@ public static class LogCat break; } - StringBuilder.Append(DateTime.Now.ToString(" yyyy-M-d HH:mm:ss : ")); + StringBuilder.Append(DateTime.Now.ToString(" yyyy-M-d HH:mm:ss ")); + StringBuilder.Append(label); + StringBuilder.Append(" :"); var key = $"log_{message}"; var translationResult = TranslationServerUtils.Translate(key); StringBuilder.Append(translationResult == key ? message : translationResult); @@ -86,14 +162,21 @@ public static class LogCat /// This message supports localized output, assuming there is already a translation key, Hello = 你好, passing hello will output 你好. /// 这个消息支持本地化输出,假设已存在翻译key,Hello = 你好,传入Hello则会输出你好。 /// - public static void Log(string message) + /// + /// + public static void Log(string message, string label = LogLabel.Default) { + if (!IsEnabledLogLabel(label)) + { + return; + } + if (_minLogLevel > InfoLogLevel) { return; } - GD.Print(HandleMessage(InfoLogLevel, message)); + GD.Print(HandleMessage(InfoLogLevel, message, label)); } /// @@ -106,55 +189,81 @@ public static class LogCat /// This message supports localized output, assuming there is already a translation key, Hello = 你好, passing hello will output 你好. /// 这个消息支持本地化输出,假设已存在翻译key,Hello = 你好,传入Hello则会输出你好。 /// - public static void LogError(string message) + /// + public static void LogError(string message, string label = LogLabel.Default) { + if (!IsEnabledLogLabel(label)) + { + return; + } + if (_minLogLevel > ErrorLogLevel) { return; } - GD.PrintErr(HandleMessage(ErrorLogLevel, message)); + GD.PrintErr(HandleMessage(ErrorLogLevel, message, label)); } - public static void LogWarning(string message) + public static void LogWarning(string message, string label = LogLabel.Default) { + if (!IsEnabledLogLabel(label)) + { + return; + } + if (_minLogLevel > WarningLogLevel) { return; } - GD.Print(HandleMessage(WarningLogLevel, message)); + GD.Print(HandleMessage(WarningLogLevel, message, label)); } - public static void LogErrorWithFormat(string message, params object?[] args) + public static void LogErrorWithFormat(string message, string label, params object?[] args) { + if (!IsEnabledLogLabel(label)) + { + return; + } + if (_minLogLevel > ErrorLogLevel) { return; } - GD.PrintErr(string.Format(HandleMessage(ErrorLogLevel, message).ToString(), args)); + GD.PrintErr(string.Format(HandleMessage(ErrorLogLevel, message, label).ToString(), args)); } - public static void LogWithFormat(string message, params object?[] args) + public static void LogWithFormat(string message, string label, params object?[] args) { + if (!IsEnabledLogLabel(label)) + { + return; + } + if (_minLogLevel > InfoLogLevel) { return; } - GD.Print(string.Format(HandleMessage(InfoLogLevel, message).ToString(), args)); + GD.Print(string.Format(HandleMessage(InfoLogLevel, message, label).ToString(), args)); } - public static void LogWarningWithFormat(string message, params object?[] args) + public static void LogWarningWithFormat(string message, string label, params object?[] args) { + if (!IsEnabledLogLabel(label)) + { + return; + } + if (_minLogLevel > InfoLogLevel) { return; } - GD.Print(string.Format(HandleMessage(WarningLogLevel, message).ToString(), args)); + GD.Print(string.Format(HandleMessage(WarningLogLevel, message, label).ToString(), args)); } /// @@ -162,10 +271,16 @@ public static class LogCat /// 当捕获异常后调用此方法 /// /// - public static void WhenCaughtException(Exception e) + /// + public static void WhenCaughtException(Exception e, string label = LogLabel.Default) { + if (!IsEnabledLogLabel(label)) + { + return; + } + //Log an exception here or send it to the server. //请在这里记录异常或将异常发送至服务器。 - GD.PrintErr(HandleMessage(ErrorLogLevel, e.Message).Append('\n').Append(e.StackTrace)); + GD.PrintErr(HandleMessage(ErrorLogLevel, e.Message, label).Append('\n').Append(e.StackTrace)); } } \ No newline at end of file diff --git a/scripts/inventory/ItemTypeRegister.cs b/scripts/inventory/ItemTypeRegister.cs index 1105737..bb64327 100644 --- a/scripts/inventory/ItemTypeRegister.cs +++ b/scripts/inventory/ItemTypeRegister.cs @@ -43,16 +43,16 @@ public static class ItemTypeRegister var files = itemRegsDir.GetFiles(); if (files == null) { - LogCat.LogWithFormat("found_files", 0); + LogCat.LogWithFormat("found_files", LogCat.LogLabel.Default, 0); return; } - LogCat.LogWithFormat("found_files", files.Length); + LogCat.LogWithFormat("found_files", LogCat.LogLabel.Default, files.Length); //将文件解析为项目类型信息 //parse files to item type infos IEnumerable typeInfos = files.SelectMany(file => ParseFile($"{itemRegsDirPath}/{file}")).ToList(); - LogCat.LogWithFormat("found_item_types", typeInfos.Count()); + LogCat.LogWithFormat("found_item_types", LogCat.LogLabel.Default, typeInfos.Count()); //遍历类型信息并注册它们。 //traverse type infos and register them. @@ -119,7 +119,7 @@ public static class ItemTypeRegister }, icon, typeInfo.MaxStackValue); var succeed = ItemTypeManager.Register(itemType); - LogCat.LogWithFormat("register_item", itemType.Id, succeed); + LogCat.LogWithFormat("register_item", label: LogCat.LogLabel.Default, itemType.Id, succeed); } //Use for yaml deserialization @@ -150,7 +150,7 @@ public static class ItemTypeRegister var ss = s.Split(','); if (ss.Length != 2) { - LogCat.LogErrorWithFormat("wrong_custom_arg", "Vector2", s); + LogCat.LogErrorWithFormat("wrong_custom_arg", LogCat.LogLabel.Default, "Vector2", s); return Vector2.Zero; } diff --git a/scripts/loader/uiLoader/MainMenuLoader.cs b/scripts/loader/uiLoader/MainMenuLoader.cs index 2283d67..b6bb916 100644 --- a/scripts/loader/uiLoader/MainMenuLoader.cs +++ b/scripts/loader/uiLoader/MainMenuLoader.cs @@ -1,7 +1,6 @@ using System; using System.IO; using System.Text; - using ColdMint.scripts.camp; using ColdMint.scripts.contribute; using ColdMint.scripts.deathInfo; @@ -11,7 +10,6 @@ using ColdMint.scripts.loot; using ColdMint.scripts.map; using ColdMint.scripts.map.roomInjectionProcessor; using ColdMint.scripts.utils; - using Godot; namespace ColdMint.scripts.loader.uiLoader; @@ -22,146 +20,147 @@ namespace ColdMint.scripts.loader.uiLoader; /// public partial class MainMenuLoader : UiLoaderTemplate { - private Button? _startGameButton; - private Label? _copyrightLabel; - private StringBuilder? _copyrightBuilder; - private PackedScene? _gameScene; - private PackedScene? _contributor; - private PackedScene? _levelGraphEditor; - private Label? _sloganLabel; - private Label? _versionLabel; - private Button? _levelGraphEditorButton; - private LinkButton? _contributorButton; + private Button? _startGameButton; + private Label? _copyrightLabel; + private StringBuilder? _copyrightBuilder; + private PackedScene? _gameScene; + private PackedScene? _contributor; + private PackedScene? _levelGraphEditor; + private Label? _sloganLabel; + private Label? _versionLabel; + private Button? _levelGraphEditorButton; + private LinkButton? _contributorButton; - public override void InitializeData() - { - if (Config.IsDebug()) - { - //Set the minimum log level to Info in debug mode.(Print all logs) - //在调试模式下将最小日志等级设置为Info。(打印全部日志) - LogCat.MinLogLevel = LogCat.InfoLogLevel; - } - else - { - //Disable all logs in the release version. - //在发行版禁用所有日志。 - LogCat.MinLogLevel = LogCat.DisableAllLogLevel; - } + public override void InitializeData() + { + if (Config.IsDebug()) + { + //Set the minimum log level to Info in debug mode.(Print all logs) + //在调试模式下将最小日志等级设置为Info。(打印全部日志) + LogCat.MinLogLevel = LogCat.InfoLogLevel; + } + else + { + //Disable all logs in the release version. + //在发行版禁用所有日志。 + LogCat.MinLogLevel = LogCat.DisableAllLogLevel; + } + ContributorDataManager.RegisterAllContributorData(); + DeathInfoGenerator.RegisterDeathInfoHandler(new SelfDeathInfoHandler()); + MapGenerator.RegisterRoomInjectionProcessor(new ChanceRoomInjectionProcessor()); + MapGenerator.RegisterRoomInjectionProcessor(new TimeIntervalRoomInjectorProcessor()); + //Register the corresponding encoding provider to solve the problem of garbled Chinese path of the compressed package + //注册对应的编码提供程序,解决压缩包中文路径乱码问题 + Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + //创建游戏数据文件夹 + var dataPath = Config.GetGameDataDirectory(); + if (!Directory.Exists(dataPath)) + { + Directory.CreateDirectory(dataPath); + } - ContributorDataManager.RegisterAllContributorData(); - DeathInfoGenerator.RegisterDeathInfoHandler(new SelfDeathInfoHandler()); - MapGenerator.RegisterRoomInjectionProcessor(new ChanceRoomInjectionProcessor()); - MapGenerator.RegisterRoomInjectionProcessor(new TimeIntervalRoomInjectorProcessor()); - //Register the corresponding encoding provider to solve the problem of garbled Chinese path of the compressed package - //注册对应的编码提供程序,解决压缩包中文路径乱码问题 - Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); - //创建游戏数据文件夹 - var dataPath = Config.GetGameDataDirectory(); - if (!Directory.Exists(dataPath)) - { - Directory.CreateDirectory(dataPath); - } + //Registered camp + //注册阵营 + var defaultCamp = new Camp(Config.CampId.Default) + { + FriendInjury = true + }; + CampManager.SetDefaultCamp(defaultCamp); + var mazoku = new Camp(Config.CampId.Mazoku); + CampManager.AddCamp(mazoku); + var aborigines = new Camp(Config.CampId.Aborigines); + CampManager.AddCamp(aborigines); + _gameScene = GD.Load("res://scenes/game.tscn"); + _contributor = GD.Load("res://scenes/contributor.tscn"); + _levelGraphEditor = GD.Load("res://scenes/levelGraphEditor.tscn"); + //Register ItemTypes from file + //从文件注册物品类型 + ItemTypeRegister.RegisterFromFile(); + //Hardcoded ItemTypes Register + //硬编码注册物品类型 + ItemTypeRegister.StaticRegister(); - //Registered camp - //注册阵营 - var defaultCamp = new Camp(Config.CampId.Default) - { - FriendInjury = true - }; - CampManager.SetDefaultCamp(defaultCamp); - var mazoku = new Camp(Config.CampId.Mazoku); - CampManager.AddCamp(mazoku); - var aborigines = new Camp(Config.CampId.Aborigines); - CampManager.AddCamp(aborigines); - _gameScene = GD.Load("res://scenes/game.tscn"); - _contributor = GD.Load("res://scenes/contributor.tscn"); - _levelGraphEditor = GD.Load("res://scenes/levelGraphEditor.tscn"); - - //Register ItemTypes from file - //从文件注册物品类型 - ItemTypeRegister.RegisterFromFile(); - //Hardcoded ItemTypes Register - //硬编码注册物品类型 - ItemTypeRegister.StaticRegister(); - - //静态注册掉落表 - LootRegister.StaticRegister(); - } + //静态注册掉落表 + LootRegister.StaticRegister(); + } - public override void InitializeUi() - { - _contributorButton = GetNode("VBoxContainer2/ContributorButton"); - _startGameButton = GetNode public class PatrolStateProcessor : StateProcessorTemplate { + public Vector2[]? Points { get; set; } + + private int _index; + private Vector2? _originPosition; + protected override void OnExecute(StateContext context, Node owner) { if (owner is not AiCharacter aiCharacter) { return; } - - aiCharacter.MoveLeft(); + + if (Points == null || Points.Length == 0) + { + LogCat.LogError("no_points", label: LogCat.LogLabel.PatrolStateProcessor); + return; + } + + if (_originPosition == null) + { + if (!aiCharacter.IsOnFloor()) + { + LogCat.LogWarning("patrol_not_on_floor", LogCat.LogLabel.PatrolStateProcessor); + return; + } + + _originPosition = aiCharacter.GlobalPosition; + LogCat.LogWithFormat("patrol_origin_position", LogCat.LogLabel.PatrolStateProcessor, + _originPosition); + } + + var point = _originPosition + Points[_index]; + var distance = aiCharacter.GlobalPosition.DistanceTo(point.Value); + if (distance < 10) + { + LogCat.LogWithFormat("patrol_arrival_point", LogCat.LogLabel.PatrolStateProcessor, point); + _index++; + if (_index >= Points.Length) + { + _index = 0; + } + } + else + { + LogCat.LogWithFormat("patrol_to_next_point", label: LogCat.LogLabel.PatrolStateProcessor, point, + aiCharacter.GlobalPosition, Points[_index], + distance); + aiCharacter.SetTargetPosition(point.Value); + } } + public override State State => State.Patrol; } \ No newline at end of file diff --git a/scripts/utils/NodeUtils.cs b/scripts/utils/NodeUtils.cs index f739729..20d6942 100644 --- a/scripts/utils/NodeUtils.cs +++ b/scripts/utils/NodeUtils.cs @@ -220,7 +220,7 @@ public static class NodeUtils if (node is T result) return result; // If the transformation fails, release the created node //如果转型失败,释放所创建的节点 - LogCat.LogWarningWithFormat("warning_node_cannot_cast_to", node, nameof(T)); + LogCat.LogWarningWithFormat("warning_node_cannot_cast_to", LogCat.LogLabel.Default, node, nameof(T)); node.QueueFree(); return null; } diff --git a/scripts/utils/TimeUtils.cs b/scripts/utils/TimeUtils.cs index 85e7e30..c47048c 100644 --- a/scripts/utils/TimeUtils.cs +++ b/scripts/utils/TimeUtils.cs @@ -33,7 +33,8 @@ public static class TimeUtils var compNum1 = DateTime.Compare(dateTime, dtStartTime); var compNum2 = DateTime.Compare(dateTime, dtEndTime); var result = compNum1 >= 0 && compNum2 <= 0; - LogCat.LogWithFormat("time_range_debug", dateTime, dtStartTime, dtEndTime, result); + LogCat.LogWithFormat("time_range_debug", LogCat.LogLabel.Default, dateTime, dtStartTime, dtEndTime, + result); return result; } } \ No newline at end of file