임시 건설 UI 생성
기타 불필요 디버깅 로그 제거
This commit is contained in:
@@ -14,9 +14,7 @@ namespace Northbound
|
||||
{
|
||||
[Header("UI References")]
|
||||
[SerializeField] private Image iconImage;
|
||||
[SerializeField] private TextMeshProUGUI nameText;
|
||||
[SerializeField] private TextMeshProUGUI hotkeyText;
|
||||
[SerializeField] private TextMeshProUGUI costText;
|
||||
[SerializeField] private Image backgroundImage;
|
||||
[SerializeField] private Button button;
|
||||
|
||||
@@ -26,6 +24,8 @@ namespace Northbound
|
||||
[SerializeField] private Color hoverColor = new Color(0.3f, 0.3f, 0.3f, 1f);
|
||||
|
||||
private TowerData buildingData;
|
||||
|
||||
public TowerData BuildingData => buildingData;
|
||||
private int slotIndex;
|
||||
private BuildingQuickslotUI quickslotUI;
|
||||
private bool isSelected = false;
|
||||
@@ -53,20 +53,7 @@ namespace Northbound
|
||||
UpdateVisuals();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 비용 표시 업데이트 (자원 변화 시 호출)
|
||||
/// </summary>
|
||||
public void UpdateCostDisplay()
|
||||
{
|
||||
if (nameText != null && buildingData != null)
|
||||
{
|
||||
var coreResourceManager = CoreResourceManager.Instance;
|
||||
bool canAfford = coreResourceManager != null && coreResourceManager.CanAfford(buildingData.mana);
|
||||
string costTextT = canAfford ? $"{buildingData.mana}" : $"<color=red>{buildingData.mana}</color>";
|
||||
nameText.text = $"{buildingData.buildingName}";
|
||||
costText.text = $"Cost: {costTextT}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// UI 업데이트
|
||||
@@ -76,7 +63,6 @@ namespace Northbound
|
||||
if (buildingData == null) return;
|
||||
|
||||
// 아이콘 설정
|
||||
/*
|
||||
if (iconImage != null && buildingData.icon != null)
|
||||
{
|
||||
iconImage.sprite = buildingData.icon;
|
||||
@@ -86,17 +72,6 @@ namespace Northbound
|
||||
{
|
||||
iconImage.enabled = false;
|
||||
}
|
||||
*/
|
||||
iconImage.enabled = false;
|
||||
// 이름 설정
|
||||
if (nameText != null)
|
||||
{
|
||||
var coreResourceManager = CoreResourceManager.Instance;
|
||||
bool canAfford = coreResourceManager != null && coreResourceManager.CanAfford(buildingData.mana);
|
||||
string costTextT = canAfford ? $"{buildingData.mana}" : $"<color=red>{buildingData.mana}</color>";
|
||||
nameText.text = $"{buildingData.buildingName}";
|
||||
costText.text = $"Cost: {costTextT}";
|
||||
}
|
||||
|
||||
// 배경 색상
|
||||
UpdateBackgroundColor();
|
||||
|
||||
Reference in New Issue
Block a user