feat: 패시브 트리 프로토타입 구현
- 패시브 트리/노드/프리셋 데이터와 카탈로그 참조 구조를 추가하고 Resources 의존을 Data/Passives 자산 구조로 정리 - 플레이어 런타임, 전투 계수, 프리셋 적용, 멀티플레이 동기화 경로에 패시브 적용 로직 연결 - 프리팹 기반 패시브 트리 UI와 노드 아이콘/프리셋/상세 패널 흐름을 추가하고 HUD에 연동 - 패시브 디버그/부트스트랩 메뉴와 UI 프리팹 재생성 경로를 추가
This commit is contained in:
23
Assets/_Game/Scripts/UI/PassiveTreeNodeView.cs
Normal file
23
Assets/_Game/Scripts/UI/PassiveTreeNodeView.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Colosseum.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// 패시브 트리 노드 프리팹의 참조 모음입니다.
|
||||
/// </summary>
|
||||
public class PassiveTreeNodeView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private RectTransform rootRect;
|
||||
[SerializeField] private Image backgroundImage;
|
||||
[SerializeField] private Image innerImage;
|
||||
[SerializeField] private Button button;
|
||||
[SerializeField] private Outline outline;
|
||||
|
||||
public RectTransform RootRect => rootRect;
|
||||
public Image BackgroundImage => backgroundImage;
|
||||
public Image InnerImage => innerImage;
|
||||
public Button Button => button;
|
||||
public Outline Outline => outline;
|
||||
}
|
||||
}
|
||||
2
Assets/_Game/Scripts/UI/PassiveTreeNodeView.cs.meta
Normal file
2
Assets/_Game/Scripts/UI/PassiveTreeNodeView.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68ca5a2201ac9a446ba14501b44a6222
|
||||
1416
Assets/_Game/Scripts/UI/PassiveTreeUI.cs
Normal file
1416
Assets/_Game/Scripts/UI/PassiveTreeUI.cs
Normal file
File diff suppressed because it is too large
Load Diff
2
Assets/_Game/Scripts/UI/PassiveTreeUI.cs.meta
Normal file
2
Assets/_Game/Scripts/UI/PassiveTreeUI.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cbd4a7a9310669419c8eb607903f8b1
|
||||
64
Assets/_Game/Scripts/UI/PassiveTreeViewReferences.cs
Normal file
64
Assets/_Game/Scripts/UI/PassiveTreeViewReferences.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using TMPro;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Colosseum.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// 패시브 트리 메인 뷰 프리팹의 참조 모음입니다.
|
||||
/// </summary>
|
||||
public class PassiveTreeViewReferences : MonoBehaviour
|
||||
{
|
||||
[Header("Root")]
|
||||
[SerializeField] private RectTransform rootRect;
|
||||
[SerializeField] private GameObject overlayRoot;
|
||||
[SerializeField] private RectTransform panelRect;
|
||||
|
||||
[Header("Header")]
|
||||
[SerializeField] private Button toggleButton;
|
||||
[SerializeField] private TextMeshProUGUI toggleButtonLabel;
|
||||
[SerializeField] private TextMeshProUGUI pointsSummaryText;
|
||||
[SerializeField] private Button closeButton;
|
||||
|
||||
[Header("Body")]
|
||||
[SerializeField] private TextMeshProUGUI selectionSummaryText;
|
||||
[SerializeField] private Button nonePresetButton;
|
||||
[SerializeField] private Button defensePresetButton;
|
||||
[SerializeField] private Button supportPresetButton;
|
||||
[SerializeField] private Button attackPresetButton;
|
||||
[SerializeField] private Button clearButton;
|
||||
[SerializeField] private RectTransform graphRect;
|
||||
[SerializeField] private RectTransform connectionLayer;
|
||||
[SerializeField] private RectTransform nodeLayer;
|
||||
[SerializeField] private RectTransform detailContent;
|
||||
[SerializeField] private TextMeshProUGUI detailText;
|
||||
[SerializeField] private Button selectNodeButton;
|
||||
[SerializeField] private TextMeshProUGUI selectNodeButtonLabel;
|
||||
|
||||
[Header("Footer")]
|
||||
[SerializeField] private TextMeshProUGUI statusText;
|
||||
|
||||
public RectTransform RootRect => rootRect;
|
||||
public GameObject OverlayRoot => overlayRoot;
|
||||
public RectTransform PanelRect => panelRect;
|
||||
public Button ToggleButton => toggleButton;
|
||||
public TextMeshProUGUI ToggleButtonLabel => toggleButtonLabel;
|
||||
public TextMeshProUGUI PointsSummaryText => pointsSummaryText;
|
||||
public Button CloseButton => closeButton;
|
||||
public TextMeshProUGUI SelectionSummaryText => selectionSummaryText;
|
||||
public Button NonePresetButton => nonePresetButton;
|
||||
public Button DefensePresetButton => defensePresetButton;
|
||||
public Button SupportPresetButton => supportPresetButton;
|
||||
public Button AttackPresetButton => attackPresetButton;
|
||||
public Button ClearButton => clearButton;
|
||||
public RectTransform GraphRect => graphRect;
|
||||
public RectTransform ConnectionLayer => connectionLayer;
|
||||
public RectTransform NodeLayer => nodeLayer;
|
||||
public RectTransform DetailContent => detailContent;
|
||||
public TextMeshProUGUI DetailText => detailText;
|
||||
public Button SelectNodeButton => selectNodeButton;
|
||||
public TextMeshProUGUI SelectNodeButtonLabel => selectNodeButtonLabel;
|
||||
public TextMeshProUGUI StatusText => statusText;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 110020793eb86f044b14fe49801bd83e
|
||||
@@ -26,6 +26,10 @@ namespace Colosseum.UI
|
||||
[Tooltip("이상상태 요약 텍스트를 자동 생성할지 여부")]
|
||||
[SerializeField] private bool autoCreateAbnormalitySummary = true;
|
||||
|
||||
[Header("Passive UI")]
|
||||
[Tooltip("런타임 패시브 UI 컴포넌트를 자동으로 보정할지 여부")]
|
||||
[SerializeField] private bool autoCreatePassiveTreeUi = true;
|
||||
|
||||
[Header("Target")]
|
||||
[Tooltip("자동으로 로컬 플레이어 찾기")]
|
||||
[SerializeField] private bool autoFindPlayer = true;
|
||||
@@ -41,6 +45,11 @@ namespace Colosseum.UI
|
||||
/// </summary>
|
||||
public string CurrentAbnormalitySummary => abnormalitySummaryText != null ? abnormalitySummaryText.text : string.Empty;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
EnsurePassiveTreeUi();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (autoFindPlayer)
|
||||
@@ -235,6 +244,14 @@ namespace Colosseum.UI
|
||||
abnormalitySummaryText = summaryText;
|
||||
}
|
||||
|
||||
private void EnsurePassiveTreeUi()
|
||||
{
|
||||
if (!autoCreatePassiveTreeUi || GetComponent<PassiveTreeUI>() != null)
|
||||
return;
|
||||
|
||||
gameObject.AddComponent<PassiveTreeUI>();
|
||||
}
|
||||
|
||||
private void UpdateAbnormalitySummary()
|
||||
{
|
||||
if (abnormalitySummaryText == null)
|
||||
|
||||
Reference in New Issue
Block a user