아이탬 구매 자원 업데이트
This commit is contained in:
parent
fe3520deb3
commit
e7f121a2d6
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class GameCtrl : MonoBehaviour
|
public class GameCtrl : SingletonMonoBehaviour<GameCtrl>
|
||||||
{
|
{
|
||||||
[SerializeField] TMP_Text[] goldText;
|
[SerializeField] TMP_Text[] goldText;
|
||||||
[SerializeField] TMP_Text[] cashText;
|
[SerializeField] TMP_Text[] cashText;
|
||||||
|
|
|
||||||
|
|
@ -127,14 +127,11 @@ public class MainCtrl : MonoBehaviour
|
||||||
Statics.equipment = data.equipment.OrderBy(n => n.equipment_data_id).ToList();
|
Statics.equipment = data.equipment.OrderBy(n => n.equipment_data_id).ToList();
|
||||||
//유닛정보 Set
|
//유닛정보 Set
|
||||||
foreach (DeckUnitInfo item in units)
|
foreach (DeckUnitInfo item in units)
|
||||||
{
|
|
||||||
Statics.deckUnit.Add(item.id, item);
|
Statics.deckUnit.Add(item.id, item);
|
||||||
}
|
|
||||||
//다이나믹 데이터 Set
|
//다이나믹 데이터 Set
|
||||||
foreach (var item in data.dynamic_data)
|
foreach (var item in data.dynamic_data)
|
||||||
{
|
|
||||||
Statics.dynamic.Add(item.name, item.value);
|
Statics.dynamic.Add(item.name, item.value);
|
||||||
}
|
|
||||||
|
|
||||||
Statics.nickname = data.nickname;
|
Statics.nickname = data.nickname;
|
||||||
Statics.gold = data.gold;
|
Statics.gold = data.gold;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ public class ShopType1itemPrefab : MonoBehaviour
|
||||||
resp.Request((data) =>
|
resp.Request((data) =>
|
||||||
{
|
{
|
||||||
Debug.Log("아이템 구매 성공");
|
Debug.Log("아이템 구매 성공");
|
||||||
|
Statics.gold = data.gold;
|
||||||
|
Statics.cash = data.cash;
|
||||||
|
GameCtrl.Instance.MoneyUpdate();
|
||||||
}, shopItemData.index);
|
}, shopItemData.index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ public class ShopType2itemPrefab : MonoBehaviour
|
||||||
resp.Request((data) =>
|
resp.Request((data) =>
|
||||||
{
|
{
|
||||||
Debug.Log("아이템 구매 성공");
|
Debug.Log("아이템 구매 성공");
|
||||||
|
Statics.gold = data.gold;
|
||||||
|
Statics.cash = data.cash;
|
||||||
|
GameCtrl.Instance.MoneyUpdate();
|
||||||
}, shopItemData.index);
|
}, shopItemData.index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -184,8 +184,8 @@ public class BuyShopItemResp : Request<BuyShopItemResp>
|
||||||
|
|
||||||
public long addGold { get; set; }
|
public long addGold { get; set; }
|
||||||
public long addCash { get; set; }
|
public long addCash { get; set; }
|
||||||
public long gold { get; set; }
|
public ulong gold { get; set; }
|
||||||
public long cash { get; set; }
|
public ulong cash { get; set; }
|
||||||
public List<DeckUnitInfo> deck_unit { get; set; }
|
public List<DeckUnitInfo> deck_unit { get; set; }
|
||||||
public List<Equipment> equipment { get; set; }
|
public List<Equipment> equipment { get; set; }
|
||||||
public List<ConsumableItem> consumableItem { get; set; }
|
public List<ConsumableItem> consumableItem { get; set; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue