feat: 플레이어 이상상태 HUD 표시 및 디버그 보강
- AbnormalityData에 UI 표시 여부 플래그를 추가하고 이상상태 목록 UI가 이를 반영하도록 정리 - PlayerHUD가 로컬 플레이어의 이상상태 요약 문자열을 런타임에 자동 생성해 표시하도록 확장 - 디버그 메뉴에 기절, 침묵, 집행자의 낙인 적용과 HUD 요약 로그 기능을 추가 - TMP 한글 폰트를 HUD 요약에 재사용하고 관련 폰트 아틀라스를 갱신 - Unity 리프레시, 빌드, 집행자의 낙인 HUD 출력 로그로 동작 검증
This commit is contained in:
@@ -3,6 +3,8 @@ using System.Text;
|
||||
using Colosseum.Enemy;
|
||||
using Colosseum.Player;
|
||||
using Colosseum.Skills;
|
||||
using Colosseum.UI;
|
||||
using Colosseum.Abnormalities;
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@@ -18,6 +20,9 @@ namespace Colosseum.Editor
|
||||
private const string HealSkillPath = "Assets/_Game/Data/Skills/Data_Skill_Player_치유.asset";
|
||||
private const string AreaHealSkillPath = "Assets/_Game/Data/Skills/Data_Skill_Player_광역치유.asset";
|
||||
private const string ShieldSkillPath = "Assets/_Game/Data/Skills/Data_Skill_Player_보호막.asset";
|
||||
private const string StunAbnormalityPath = "Assets/_Game/Data/Abnormalities/Data_Abnormality_Player_Stun.asset";
|
||||
private const string SilenceAbnormalityPath = "Assets/_Game/Data/Abnormalities/Data_Abnormality_Player_Silence.asset";
|
||||
private const string MarkAbnormalityPath = "Assets/_Game/Data/Abnormalities/Data_Abnormality_Player_집행자의낙인.asset";
|
||||
|
||||
[MenuItem("Tools/Colosseum/Debug/Cast Local Skill 3")]
|
||||
private static void CastLocalSkill3()
|
||||
@@ -129,6 +134,43 @@ namespace Colosseum.Editor
|
||||
Debug.Log($"[Debug] 보스 위협 요약\n{builder}");
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Colosseum/Debug/Apply Local Stun")]
|
||||
private static void ApplyLocalStun()
|
||||
{
|
||||
ApplyLocalAbnormality(StunAbnormalityPath);
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Colosseum/Debug/Apply Local Silence")]
|
||||
private static void ApplyLocalSilence()
|
||||
{
|
||||
ApplyLocalAbnormality(SilenceAbnormalityPath);
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Colosseum/Debug/Apply Local Mark")]
|
||||
private static void ApplyLocalMark()
|
||||
{
|
||||
ApplyLocalAbnormality(MarkAbnormalityPath);
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Colosseum/Debug/Log HUD Abnormality Summary")]
|
||||
private static void LogHudAbnormalitySummary()
|
||||
{
|
||||
if (!EditorApplication.isPlaying)
|
||||
{
|
||||
Debug.LogWarning("[Debug] 플레이 모드에서만 사용할 수 있습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerHUD playerHud = Object.FindFirstObjectByType<PlayerHUD>();
|
||||
if (playerHud == null)
|
||||
{
|
||||
Debug.LogWarning("[Debug] PlayerHUD를 찾지 못했습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log($"[Debug] HUD 이상상태 요약 | {playerHud.CurrentAbnormalitySummary}");
|
||||
}
|
||||
|
||||
private static PlayerSkillInput FindLocalSkillInput()
|
||||
{
|
||||
PlayerSkillInput[] skillInputs = Object.FindObjectsByType<PlayerSkillInput>(FindObjectsInactive.Exclude, FindObjectsSortMode.None);
|
||||
@@ -153,6 +195,17 @@ namespace Colosseum.Editor
|
||||
return null;
|
||||
}
|
||||
|
||||
private static AbnormalityManager FindLocalAbnormalityManager()
|
||||
{
|
||||
PlayerNetworkController localNetworkController = FindLocalNetworkController();
|
||||
if (localNetworkController == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return localNetworkController.GetComponent<AbnormalityManager>();
|
||||
}
|
||||
|
||||
private static void CastLocalSkill(int slotIndex)
|
||||
{
|
||||
if (!EditorApplication.isPlaying)
|
||||
@@ -196,5 +249,30 @@ namespace Colosseum.Editor
|
||||
localSkillInput.SetSkill(TemporaryDebugSlotIndex, skill);
|
||||
localSkillInput.DebugCastSkill(TemporaryDebugSlotIndex);
|
||||
}
|
||||
|
||||
private static void ApplyLocalAbnormality(string assetPath)
|
||||
{
|
||||
if (!EditorApplication.isPlaying)
|
||||
{
|
||||
Debug.LogWarning("[Debug] 플레이 모드에서만 사용할 수 있습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
AbnormalityManager abnormalityManager = FindLocalAbnormalityManager();
|
||||
if (abnormalityManager == null)
|
||||
{
|
||||
Debug.LogWarning("[Debug] 로컬 AbnormalityManager를 찾지 못했습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
AbnormalityData abnormality = AssetDatabase.LoadAssetAtPath<AbnormalityData>(assetPath);
|
||||
if (abnormality == null)
|
||||
{
|
||||
Debug.LogWarning($"[Debug] 이상상태 에셋을 찾지 못했습니다: {assetPath}");
|
||||
return;
|
||||
}
|
||||
|
||||
abnormalityManager.ApplyAbnormality(abnormality, abnormalityManager.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user