This commit is contained in:
parent
3cf6348c03
commit
99366d1adf
|
|
@ -8261,6 +8261,9 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: cad5682e6198cc74ebc76c1292280a66, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
texts_money:
|
||||
- {fileID: 1301406509}
|
||||
- {fileID: 278813020}
|
||||
m_AttandanceUI: {fileID: 388368217}
|
||||
m_OptionUI: {fileID: 2034573240}
|
||||
m_ProfileUI: {fileID: 1457200138}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
|||
IEnumerator Start()
|
||||
{
|
||||
Load();
|
||||
yield return new WaitForSeconds(1f);
|
||||
while (!LobbyUI.Ins) yield return null;
|
||||
LobbyUI.Ins.Set_Money();
|
||||
}
|
||||
|
||||
public void Load()
|
||||
|
|
@ -81,7 +82,10 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
|||
|
||||
public int Get_DoY() { return m_SaveData.LastDoY; }
|
||||
|
||||
public void Add_Coin(int add = 1) { m_SaveData.Coin += add; }
|
||||
public void Add_ChatCoin(int add = 1) { m_SaveData.ChatCoin += add; LobbyUI.Ins.Set_Money(); }
|
||||
public int Get_ChatCoin() { return m_SaveData.ChatCoin; }
|
||||
|
||||
public void Add_Coin(int add = 1) { m_SaveData.Coin += add; LobbyUI.Ins.Set_Money(); }
|
||||
public int Get_Coin() { return m_SaveData.Coin; }
|
||||
|
||||
public void Add_MoneyGacha(int add) { m_SaveData.GachaCoin += add; }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class LobbyUI : MonoBehaviourSingletonTemplate<LobbyUI>
|
||||
{
|
||||
[SerializeField] TextMeshProUGUI[] texts_money; // 0 채팅 코인, 1 코인
|
||||
|
||||
[SerializeField] AttandanceUI m_AttandanceUI;
|
||||
[SerializeField] OptionUI m_OptionUI;
|
||||
[SerializeField] ProfileUI m_ProfileUI;
|
||||
|
|
@ -21,6 +24,12 @@ public class LobbyUI : MonoBehaviourSingletonTemplate<LobbyUI>
|
|||
}
|
||||
}
|
||||
|
||||
public void Set_Money()
|
||||
{
|
||||
texts_money[0].text = SaveMgr.Ins.Get_Coin().ToString();
|
||||
texts_money[1].text = SaveMgr.Ins.Get_Coin().ToString();
|
||||
}
|
||||
|
||||
public void Show_Profile(int girlid)
|
||||
{
|
||||
m_ProfileUI.Set(girlid);
|
||||
|
|
|
|||
Loading…
Reference in New Issue