From 6315bfc1e5525544a32210f46a7d2d6a447214d2 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 13 八月 2018 20:58:25 +0800
Subject: [PATCH] fixed #382 战斗系统: 测试用默认开启AI逻辑修改为缓存设置

---
 Utility/RuntimeLogUtility.cs |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/Utility/RuntimeLogUtility.cs b/Utility/RuntimeLogUtility.cs
index 14ab909..5269390 100644
--- a/Utility/RuntimeLogUtility.cs
+++ b/Utility/RuntimeLogUtility.cs
@@ -7,6 +7,8 @@
 
 public class RuntimeLogUtility : MonoBehaviour
 {
+    private static string LS_Key_ForceAutoFight = "LS_Key_ForceAutoFight";
+
     public static bool s_BattleLog = false;
     public static bool s_MoveLog = false;
     public static bool s_ForceOneEnemy = false;
@@ -14,7 +16,24 @@
     public static bool s_UseKeyBoardCastSkill = false;
     public static bool s_LogMoveDistance = false;
     public static bool s_SkillEffectLog = false;
-    public static bool s_forceAutoFight = false;
+    public static bool s_forceAutoFight
+    {
+        get
+        {
+#if UNITY_EDITOR
+            return EditorPrefs.GetBool("LS_Key_ForceAutoFight", true);
+#else
+            return true;
+#endif
+        }
+
+        set
+        {
+#if UNITY_EDITOR
+            EditorPrefs.SetBool("LS_Key_ForceAutoFight", value);
+#endif
+        }
+    }
     public static string s_LogPath;
     static readonly Dictionary<uint, StringBuilder> s_LogDict = new Dictionary<uint, StringBuilder>();
     static readonly List<string> s_LogList = new List<string>();

--
Gitblit v1.8.0