feat: UI 동작 수정

This commit is contained in:
aube.lee
2025-02-28 10:42:48 +09:00
parent c00cbc44aa
commit 9fb7798afd
6 changed files with 104 additions and 210 deletions

View File

@@ -63,6 +63,23 @@ namespace TON
// UpdateUI();
});
}
public void UseGold(int amount)
{
if (goldAmount - amount < amount)
{
// 골드 재화 사용 불가 팝업
UIManager.Show<GoldPopup>(UIList.GoldPopup);
return;
}
goldAmount -= amount;
cashDataManager.UpdateGoldData(goldAmount, updatedData =>
{
// TODO: UI 업데이트 로직 적용
// UpdateUI();
});
}
public void AddFish(int amount)
{
fishAmount += amount;
@@ -72,6 +89,22 @@ namespace TON
// UpdateUI();
});
}
public void UseFish(int amount)
{
if (fishAmount - amount < amount)
{
// 생선 재화 사용 불가 팝업
UIManager.Show<FishPopup>(UIList.FishPopup);
return;
}
fishAmount -= amount;
cashDataManager.UpdateFishData(fishAmount, updatedData =>
{
// TODO: UI 업데이트 로직 적용
// UpdateUI();
});
}
// 플레이어가 사망했을때 호출
public void PlayerDeadEvent()