From ad92163f252143e711ca99ae1cc214bfef20615d Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 21 七月 2025 19:24:13 +0800
Subject: [PATCH] 125 【战斗】战斗系统 基础编辑器暂时废除

---
 Assets/Editor/Tool/StoryBattleEditorWindow.cs |  196 ++++++++++++++++++++++++------------------------
 1 files changed, 98 insertions(+), 98 deletions(-)

diff --git a/Assets/Editor/Tool/StoryBattleEditorWindow.cs b/Assets/Editor/Tool/StoryBattleEditorWindow.cs
index ae69d0f..7e6f66f 100644
--- a/Assets/Editor/Tool/StoryBattleEditorWindow.cs
+++ b/Assets/Editor/Tool/StoryBattleEditorWindow.cs
@@ -1,120 +1,120 @@
-using UnityEngine;
-using UnityEditor;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
+// using UnityEngine;
+// using UnityEditor;
+// using System;
+// using System.Collections;
+// using System.Collections.Generic;
+// using System.Linq;
 
-public class StoryBattleEditorWindow : EditorWindow
-{
+// public class StoryBattleEditorWindow : EditorWindow
+// {
 
-    private StoryBattleField storyBattleField;
+//     private StoryBattleField storyBattleField;
 
-    // 鍋囪浣犳湁濡備笅瀛楁
-    private int redIndex = 0;
-    private int blueIndex = 0;
+//     // 鍋囪浣犳湁濡備笅瀛楁
+//     private int redIndex = 0;
+//     private int blueIndex = 0;
 
-    private int skillId = 0;
-    private SkillConfig currentSkillConfig;
-    private int casterCamp = 0; // 0=绾㈡柟锛�1=钃濇柟
+//     private int skillId = 0;
+//     private SkillConfig currentSkillConfig;
+//     private int casterCamp = 0; // 0=绾㈡柟锛�1=钃濇柟
 
-    private float timeScale = 1f;
+//     private float timeScale = 1f;
 
-    [MenuItem("Tools/StoryBattleEditor")]
-    public static void OpenWindow()
-    {
-        StoryBattleEditorWindow window = GetWindow<StoryBattleEditorWindow>("Story Battle Editor");
-        window.minSize = new Vector2(800, 600);
-        window.Show();
+//     [MenuItem("Tools/StoryBattleEditor")]
+//     public static void OpenWindow()
+//     {
+//         StoryBattleEditorWindow window = GetWindow<StoryBattleEditorWindow>("Story Battle Editor");
+//         window.minSize = new Vector2(800, 600);
+//         window.Show();
 
-        BattleManager.Instance.StartStoryBattle();
-        window.storyBattleField = BattleManager.Instance.storyBattleField;
-    }
+//         BattleManager.Instance.StartStoryBattle();
+//         window.storyBattleField = BattleManager.Instance.storyBattleField;
+//     }
 
-    private void OnGUI()
-    {
-        GUILayout.Label("Story Battle Editor", EditorStyles.boldLabel);
+//     private void OnGUI()
+//     {
+//         GUILayout.Label("Story Battle Editor", EditorStyles.boldLabel);
 
-        if (storyBattleField == null)
-        {
-            EditorGUILayout.HelpBox("璇峰厛鎸囧畾 StoryBattleField 瀹炰緥", MessageType.Warning);
-            if (GUILayout.Button("閲嶆柊鍔犺浇"))
-            {
-                storyBattleField = BattleManager.Instance.storyBattleField;
-            }
-            return;
-        }
+//         if (storyBattleField == null)
+//         {
+//             EditorGUILayout.HelpBox("璇峰厛鎸囧畾 StoryBattleField 瀹炰緥", MessageType.Warning);
+//             if (GUILayout.Button("閲嶆柊鍔犺浇"))
+//             {
+//                 storyBattleField = BattleManager.Instance.storyBattleField;
+//             }
+//             return;
+//         }
 
-        EditorGUILayout.Space();
-        EditorGUILayout.LabelField("鎶�鑳藉綍鍒跺姩浣滄祴璇�", EditorStyles.boldLabel);
+//         EditorGUILayout.Space();
+//         EditorGUILayout.LabelField("鎶�鑳藉綍鍒跺姩浣滄祴璇�", EditorStyles.boldLabel);
 
-        // 鎶�鑳絀D杈撳叆涓庨厤缃幏鍙�
-        skillId = EditorGUILayout.IntField("鎶�鑳絀D", skillId);
-        currentSkillConfig = SkillConfig.Get(skillId);
-        if (currentSkillConfig != null)
-        {
-            EditorGUILayout.LabelField($"鎶�鑳藉悕: {currentSkillConfig.SkillName}");
-        }
-        else
-        {
-            EditorGUILayout.HelpBox("鏈壘鍒拌鎶�鑳介厤缃�", MessageType.Warning);
-        }
+//         // 鎶�鑳絀D杈撳叆涓庨厤缃幏鍙�
+//         skillId = EditorGUILayout.IntField("鎶�鑳絀D", skillId);
+//         currentSkillConfig = SkillConfig.Get(skillId);
+//         if (currentSkillConfig != null)
+//         {
+//             EditorGUILayout.LabelField($"鎶�鑳藉悕: {currentSkillConfig.SkillName}");
+//         }
+//         else
+//         {
+//             EditorGUILayout.HelpBox("鏈壘鍒拌鎶�鑳介厤缃�", MessageType.Warning);
+//         }
 
-        timeScale = EditorGUILayout.FloatField("TimeScale", timeScale);
+//         timeScale = EditorGUILayout.FloatField("TimeScale", timeScale);
 
-        Time.timeScale = timeScale;
+//         Time.timeScale = timeScale;
 
-        // 绾㈣摑鍙屾柟 BattleObject 閫夋嫨
-        var redCampList = new List<BattleObject>(from BO in storyBattleField.battleObjMgr.redCampList where !BO.IsDead() select BO);
-        var blueCampList = new List<BattleObject>(from BO in storyBattleField.battleObjMgr.blueCampList where !BO.IsDead() select BO);
+//         // 绾㈣摑鍙屾柟 BattleObject 閫夋嫨
+//         var redCampList = new List<BattleObject>(from BO in storyBattleField.battleObjMgr.redCampList where !BO.IsDead() select BO);
+//         var blueCampList = new List<BattleObject>(from BO in storyBattleField.battleObjMgr.blueCampList where !BO.IsDead() select BO);
 
-        string[] redNames = redCampList != null
-            ? redCampList.ConvertAll(obj => obj != null ? obj.BattleObjectId.ToString() : "null").ToArray()
-            : new string[0];
-        redIndex = EditorGUILayout.Popup("绾㈡柟 BattleObject", redIndex, redNames);
+//         string[] redNames = redCampList != null
+//             ? redCampList.ConvertAll(obj => obj != null ? obj.ObjID.ToString() : "null").ToArray()
+//             : new string[0];
+//         redIndex = EditorGUILayout.Popup("绾㈡柟 BattleObject", redIndex, redNames);
 
-        string[] blueNames = blueCampList != null
-            ? blueCampList.ConvertAll(obj => obj != null ? obj.BattleObjectId.ToString() : "null").ToArray()
-            : new string[0];
-        blueIndex = EditorGUILayout.Popup("钃濇柟 BattleObject", blueIndex, blueNames);
+//         string[] blueNames = blueCampList != null
+//             ? blueCampList.ConvertAll(obj => obj != null ? obj.ObjID.ToString() : "null").ToArray()
+//             : new string[0];
+//         blueIndex = EditorGUILayout.Popup("钃濇柟 BattleObject", blueIndex, blueNames);
 
-        // 閫夋嫨鏂芥硶鑰�
-        casterCamp = EditorGUILayout.Popup("鏂芥硶鑰呴樀钀�", casterCamp, new string[] { "绾㈡柟", "钃濇柟" });
+//         // 閫夋嫨鏂芥硶鑰�
+//         casterCamp = EditorGUILayout.Popup("鏂芥硶鑰呴樀钀�", casterCamp, new string[] { "绾㈡柟", "钃濇柟" });
 
-        EditorGUILayout.Space();
-        if (GUILayout.Button("鎾斁 SkillRecordAction"))
-        {
-            if (currentSkillConfig == null)
-            {
-                Debug.LogError("SkillConfig 鏈壘鍒帮紒");
-                return;
-            }
-            if (redCampList == null || blueCampList == null || redCampList.Count == 0 || blueCampList.Count == 0)
-            {
-                Debug.LogError("绾㈡柟鎴栬摑鏂瑰垪琛ㄤ负绌猴紒");
-                return;
-            }
-            var redObj = redCampList[Mathf.Clamp(redIndex, 0, redCampList.Count - 1)];
-            var blueObj = blueCampList[Mathf.Clamp(blueIndex, 0, blueCampList.Count - 1)];
-            BattleObject caster = (casterCamp == 0) ? redObj : blueObj;
+//         EditorGUILayout.Space();
+//         if (GUILayout.Button("鎾斁 EditorSkillRecordAction"))
+//         {
+//             if (currentSkillConfig == null)
+//             {
+//                 Debug.LogError("SkillConfig 鏈壘鍒帮紒");
+//                 return;
+//             }
+//             if (redCampList == null || blueCampList == null || redCampList.Count == 0 || blueCampList.Count == 0)
+//             {
+//                 Debug.LogError("绾㈡柟鎴栬摑鏂瑰垪琛ㄤ负绌猴紒");
+//                 return;
+//             }
+//             var redObj = redCampList[Mathf.Clamp(redIndex, 0, redCampList.Count - 1)];
+//             var blueObj = blueCampList[Mathf.Clamp(blueIndex, 0, blueCampList.Count - 1)];
+//             BattleObject caster = (casterCamp == 0) ? redObj : blueObj;
 
-            // 鏋勯�燬killRecordAction
-            var action = new SkillRecordAction(skillId, storyBattleField, caster);
+//             // 鏋勯�燛ditorSkillRecordAction
+//             var action = new EditorSkillRecordAction(skillId, storyBattleField, caster);
 
-            if (storyBattleField.recordPlayer != null)
-            {
-                storyBattleField.recordPlayer.PlayRecord(action);
-            }
-            else
-            {
-                Debug.LogError("recordPlayer 鏈缃紒");
-            }
-        }
+//             if (storyBattleField.recordPlayer != null)
+//             {
+//                 storyBattleField.recordPlayer.PlayRecord(action);
+//             }
+//             else
+//             {
+//                 Debug.LogError("recordPlayer 鏈缃紒");
+//             }
+//         }
 
-        if (GUILayout.Button("鍏ㄩ儴澶嶆椿"))
-        {
-            storyBattleField.battleObjMgr.ReviveAll();
-        }
-    }
+//         if (GUILayout.Button("鍏ㄩ儴澶嶆椿"))
+//         {
+//             storyBattleField.battleObjMgr.ReviveAll();
+//         }
+//     }
 
-}
\ No newline at end of file
+// }
\ No newline at end of file

--
Gitblit v1.8.0