From 934e1d4488de512a084e6ce7c97315675b23737b Mon Sep 17 00:00:00 2001 From: Mingu Kim Date: Mon, 3 Mar 2025 18:31:52 +0900 Subject: [PATCH] =?UTF-8?q?=EC=83=81=EC=A0=90=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=A1=9C=EB=B9=84=EB=A1=9C=20=EB=8F=8C=EC=95=84=EA=B0=80?= =?UTF-8?q?=EB=8A=94=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/UI/Prefabs/UI.ShopUI.prefab | 14 +++++++++++- .../Assets/Gameton/Scripts/UI/ShopUI.cs | 22 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/Gameton-06/Assets/Gameton/Resources/UI/Prefabs/UI.ShopUI.prefab b/Gameton-06/Assets/Gameton/Resources/UI/Prefabs/UI.ShopUI.prefab index 24b58838..7c93c7d6 100644 --- a/Gameton-06/Assets/Gameton/Resources/UI/Prefabs/UI.ShopUI.prefab +++ b/Gameton-06/Assets/Gameton/Resources/UI/Prefabs/UI.ShopUI.prefab @@ -119,7 +119,19 @@ MonoBehaviour: m_TargetGraphic: {fileID: 7652757368300776695} m_OnClick: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 6017598305918751662} + m_TargetAssemblyTypeName: TON.ShopUI, Assembly-CSharp + m_MethodName: OnClickLobbyButton + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &4375841029355944655 GameObject: m_ObjectHideFlags: 0 diff --git a/Gameton-06/Assets/Gameton/Scripts/UI/ShopUI.cs b/Gameton-06/Assets/Gameton/Scripts/UI/ShopUI.cs index 366db6f7..6b43367f 100644 --- a/Gameton-06/Assets/Gameton/Scripts/UI/ShopUI.cs +++ b/Gameton-06/Assets/Gameton/Scripts/UI/ShopUI.cs @@ -6,6 +6,10 @@ namespace TON { public class ShopUI : UIBase { + // // 보유 포션 수량 + // [SerializeField] private TextMeshProUGUI hpPotionCount; + // [SerializeField] private TextMeshProUGUI mpPotionCount; + // Start is called before the first frame update void Start() { @@ -17,5 +21,23 @@ namespace TON { } + + private void OnEnable() + { + SetUserItemData(); + } + + private void SetUserItemData() + { + UserItemData userItem = PlayerDataManager.Singleton.userItem; + + // hpPotionCount.text = $"{userItem.hpPotion}"; + // mpPotionCount.text = $"{userItem.mpPotion}"; + } + + public void OnClickLobbyButton() + { + Main.Singleton.ChangeScene(SceneType.Lobby); + } } }