From 75987c59d72057f0711bec85376e33d331c9145e Mon Sep 17 00:00:00 2001 From: Yuntao Hu <695250295@qq.com> Date: Fri, 25 Jul 2025 14:34:15 +0800 Subject: [PATCH] =?UTF-8?q?debug=E6=B7=BB=E5=8A=A0=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E6=97=B6=E6=8A=80=E8=83=BD=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FightDebug/Impl/Debug_AddSelfCharacter.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ProjectNLD/Assets/Editor/FightDebug/Impl/Debug_AddSelfCharacter.cs b/ProjectNLD/Assets/Editor/FightDebug/Impl/Debug_AddSelfCharacter.cs index a5bbf0e3ba6..2ee911f2746 100644 --- a/ProjectNLD/Assets/Editor/FightDebug/Impl/Debug_AddSelfCharacter.cs +++ b/ProjectNLD/Assets/Editor/FightDebug/Impl/Debug_AddSelfCharacter.cs @@ -6,7 +6,7 @@ using UnityEditor; using UnityEngine; namespace FightDebug.Impl { - public class Debug_AddSelfCharacter: BaseSubDebugPanel + public class Debug_AddSelfCharacter : BaseSubDebugPanel { private int _characterRoleId; @@ -18,10 +18,10 @@ namespace FightDebug.Impl private DataCharacterAttri _characterConfig; private int _addCellIndex; - + public Debug_AddSelfCharacter() : base("动态添加角色") { - + } protected override void _OnDrawUI() @@ -38,14 +38,14 @@ namespace FightDebug.Impl { EditorGUILayout.HelpBox("角色ID不存在", MessageType.Error); } - + _level = EditorGUILayout.IntField("角色等级", _level); _breakLevel = EditorGUILayout.IntField("角色突破等级", _breakLevel); _awakeLevel = EditorGUILayout.IntField("角色觉醒等级", _awakeLevel); _skillLevel = EditorGUILayout.IntField("角色技能等级", _skillLevel); _addCellIndex = EditorGUILayout.IntField("CellIndex", _addCellIndex); - + if (GUILayout.Button("添加角色", GUILayout.Height(40))) { if (_characterConfig == null) @@ -73,9 +73,10 @@ namespace FightDebug.Impl return; } - var characterInfo = new CharacterDataInfo((uint)_characterRoleId,(uint)_level, (uint)_breakLevel, (uint)_awakeLevel); + var characterInfo = new CharacterDataInfo((uint)_characterRoleId, (uint)_level, (uint)_breakLevel, (uint)_awakeLevel); characterInfo.UltraSkillLevel = (uint)_skillLevel; - + characterInfo.SkillLevels = new uint[] { (uint)_skillLevel }; + LevelManager.Instance.CurrentLevel.ForceCreateSelfCharacter(characterInfo, _addCellIndex).Forget(); } }