debug添加角色时技能初始化
parent
875360e240
commit
75987c59d7
|
|
@ -6,7 +6,7 @@ using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
namespace FightDebug.Impl
|
namespace FightDebug.Impl
|
||||||
{
|
{
|
||||||
public class Debug_AddSelfCharacter: BaseSubDebugPanel
|
public class Debug_AddSelfCharacter : BaseSubDebugPanel
|
||||||
{
|
{
|
||||||
|
|
||||||
private int _characterRoleId;
|
private int _characterRoleId;
|
||||||
|
|
@ -18,10 +18,10 @@ namespace FightDebug.Impl
|
||||||
private DataCharacterAttri _characterConfig;
|
private DataCharacterAttri _characterConfig;
|
||||||
|
|
||||||
private int _addCellIndex;
|
private int _addCellIndex;
|
||||||
|
|
||||||
public Debug_AddSelfCharacter() : base("动态添加角色")
|
public Debug_AddSelfCharacter() : base("动态添加角色")
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void _OnDrawUI()
|
protected override void _OnDrawUI()
|
||||||
|
|
@ -38,14 +38,14 @@ namespace FightDebug.Impl
|
||||||
{
|
{
|
||||||
EditorGUILayout.HelpBox("角色ID不存在", MessageType.Error);
|
EditorGUILayout.HelpBox("角色ID不存在", MessageType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
_level = EditorGUILayout.IntField("角色等级", _level);
|
_level = EditorGUILayout.IntField("角色等级", _level);
|
||||||
_breakLevel = EditorGUILayout.IntField("角色突破等级", _breakLevel);
|
_breakLevel = EditorGUILayout.IntField("角色突破等级", _breakLevel);
|
||||||
_awakeLevel = EditorGUILayout.IntField("角色觉醒等级", _awakeLevel);
|
_awakeLevel = EditorGUILayout.IntField("角色觉醒等级", _awakeLevel);
|
||||||
_skillLevel = EditorGUILayout.IntField("角色技能等级", _skillLevel);
|
_skillLevel = EditorGUILayout.IntField("角色技能等级", _skillLevel);
|
||||||
|
|
||||||
_addCellIndex = EditorGUILayout.IntField("CellIndex", _addCellIndex);
|
_addCellIndex = EditorGUILayout.IntField("CellIndex", _addCellIndex);
|
||||||
|
|
||||||
if (GUILayout.Button("添加角色", GUILayout.Height(40)))
|
if (GUILayout.Button("添加角色", GUILayout.Height(40)))
|
||||||
{
|
{
|
||||||
if (_characterConfig == null)
|
if (_characterConfig == null)
|
||||||
|
|
@ -73,9 +73,10 @@ namespace FightDebug.Impl
|
||||||
return;
|
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.UltraSkillLevel = (uint)_skillLevel;
|
||||||
|
characterInfo.SkillLevels = new uint[] { (uint)_skillLevel };
|
||||||
|
|
||||||
LevelManager.Instance.CurrentLevel.ForceCreateSelfCharacter(characterInfo, _addCellIndex).Forget();
|
LevelManager.Instance.CurrentLevel.ForceCreateSelfCharacter(characterInfo, _addCellIndex).Forget();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue