feat: UIManager에서 OptionUI의 재화 데이터 업데이트 기능 연결

This commit is contained in:
aube.lee
2025-02-27 23:04:45 +09:00
parent 10f39b7237
commit 97c41a57ad
2 changed files with 8 additions and 2 deletions

View File

@@ -33,6 +33,13 @@ namespace TON
return targetUI;
}
// 상점 및 기타 화면에서 재화 데이터 업데이트 시 매니저를 통해 호출
public void UpdateCashData()
{
var targetUI = Singleton.GetUI<OptionUI>(UIList.OptionUI);
targetUI.SetCashAmount();
}
private Dictionary<UIList, UIBase> panels = new Dictionary<UIList, UIBase>();
private Dictionary<UIList, UIBase> popups = new Dictionary<UIList, UIBase>();

View File

@@ -12,7 +12,6 @@ namespace TON
public GameObject settingObject; // 더보기(옵션) 버튼
public GameObject parseObject; // 일시정지
// 로비 : 골드/생선/인벤토리/더보기 버튼
// 스테이지 : 인벤토리/일시정지 버튼
// 상점 : 골드/생선
@@ -22,7 +21,7 @@ namespace TON
SetObjectActive();
}
private void SetCashAmount()
public void SetCashAmount()
{
goldObject.GetComponentInChildren<TextMeshProUGUI>().text = $"{PlayerDataManager.Singleton.goldAmount}";
fishObject.GetComponentInChildren<TextMeshProUGUI>().text = $"{PlayerDataManager.Singleton.fishAmount}";