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); + } } }