가챠 코인 충전 시간
This commit is contained in:
parent
6b09a315cb
commit
1aab8f3674
|
|
@ -3,7 +3,7 @@ using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
public enum eInAppInitType { None, Week, Mini_One, One1, One2, Disable_Buy1, Disable_Buy2 }
|
public enum eInAppInitType { None, Week, One1, One2, Disable_Buy1, Disable_Buy2 }
|
||||||
public enum eShopBuyType { IAP, AD, Coin, Heart }
|
public enum eShopBuyType { IAP, AD, Coin, Heart }
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -333,9 +333,10 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
{
|
{
|
||||||
default: if (data.b_AdRemove) return !m_SaveData.NoAD; else return true;
|
default: if (data.b_AdRemove) return !m_SaveData.NoAD; else return true;
|
||||||
case eInAppInitType.Week: return !m_SaveData.BuyShopWeekly;
|
case eInAppInitType.Week: return !m_SaveData.BuyShopWeekly;
|
||||||
case eInAppInitType.Mini_One: return !m_SaveData.BuyShopMiniGame;
|
|
||||||
case eInAppInitType.One1: return !m_SaveData.BuyShopOne1;
|
case eInAppInitType.One1: return !m_SaveData.BuyShopOne1;
|
||||||
case eInAppInitType.One2: return !m_SaveData.BuyShopOne2;
|
case eInAppInitType.One2: return !m_SaveData.BuyShopOne2;
|
||||||
|
case eInAppInitType.Disable_Buy1: return !m_SaveData.BuyShopDisableOne1;
|
||||||
|
case eInAppInitType.Disable_Buy2: return !m_SaveData.BuyShopDisableOne2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void Set_ShopInit(eInAppInitType inittype)
|
public void Set_ShopInit(eInAppInitType inittype)
|
||||||
|
|
@ -343,9 +344,10 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
switch (inittype)
|
switch (inittype)
|
||||||
{
|
{
|
||||||
case eInAppInitType.Week: m_SaveData.BuyShopWeekly = true; break;
|
case eInAppInitType.Week: m_SaveData.BuyShopWeekly = true; break;
|
||||||
case eInAppInitType.Mini_One: m_SaveData.BuyShopMiniGame = true; break;
|
|
||||||
case eInAppInitType.One1: m_SaveData.BuyShopOne1 = true; break;
|
case eInAppInitType.One1: m_SaveData.BuyShopOne1 = true; break;
|
||||||
case eInAppInitType.One2: m_SaveData.BuyShopOne2 = true; break;
|
case eInAppInitType.One2: m_SaveData.BuyShopOne2 = true; break;
|
||||||
|
case eInAppInitType.Disable_Buy1: m_SaveData.BuyShopDisableOne1 = true; break;
|
||||||
|
case eInAppInitType.Disable_Buy2: m_SaveData.BuyShopDisableOne2 = true; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool Get_ShopNoAD() { return m_SaveData.NoAD; }
|
public bool Get_ShopNoAD() { return m_SaveData.NoAD; }
|
||||||
|
|
@ -354,7 +356,17 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
var data = m_SaveData.list_ShopLimit.Find(f => f.ShopID.Equals(id));
|
var data = m_SaveData.list_ShopLimit.Find(f => f.ShopID.Equals(id));
|
||||||
return data != null ? data.Count : 0;
|
return data != null ? data.Count : 0;
|
||||||
}
|
}
|
||||||
|
public bool Shop_FullPackage_Active()
|
||||||
|
{
|
||||||
|
if (m_SaveData.BuyShopOne1 && m_SaveData.BuyShopOne2) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public bool Shop_SalePackage_Active()
|
||||||
|
{
|
||||||
|
if (m_SaveData.BuyShopDisableOne1 && m_SaveData.BuyShopDisableOne2) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public bool GachaChargeTime_Reduce() { return m_SaveData.LuckyGameCharge; }
|
||||||
|
|
||||||
public class SaveData
|
public class SaveData
|
||||||
{
|
{
|
||||||
|
|
@ -385,9 +397,10 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
ProtectedBool _InfinityMiniGame; public bool InfinityMiniGame { get { return _InfinityMiniGame; } set { _InfinityMiniGame = value; _InfinityMiniGame.Obfuscate(); } }
|
ProtectedBool _InfinityMiniGame; public bool InfinityMiniGame { get { return _InfinityMiniGame; } set { _InfinityMiniGame = value; _InfinityMiniGame.Obfuscate(); } }
|
||||||
ProtectedBool _LuckyGameCharge; public bool LuckyGameCharge { get { return _LuckyGameCharge; } set { _LuckyGameCharge = value; _LuckyGameCharge.Obfuscate(); } }
|
ProtectedBool _LuckyGameCharge; public bool LuckyGameCharge { get { return _LuckyGameCharge; } set { _LuckyGameCharge = value; _LuckyGameCharge.Obfuscate(); } }
|
||||||
ProtectedBool _BuyShopWeekly; public bool BuyShopWeekly { get { return _BuyShopWeekly; } set { _BuyShopWeekly = value; _BuyShopWeekly.Obfuscate(); } }
|
ProtectedBool _BuyShopWeekly; public bool BuyShopWeekly { get { return _BuyShopWeekly; } set { _BuyShopWeekly = value; _BuyShopWeekly.Obfuscate(); } }
|
||||||
ProtectedBool _BuyShopMiniGame; public bool BuyShopMiniGame { get { return _BuyShopMiniGame; } set { _BuyShopMiniGame = value; _BuyShopMiniGame.Obfuscate(); } }
|
|
||||||
ProtectedBool _BuyShopOne1; public bool BuyShopOne1 { get { return _BuyShopOne1; } set { _BuyShopOne1 = value; _BuyShopOne1.Obfuscate(); } }
|
ProtectedBool _BuyShopOne1; public bool BuyShopOne1 { get { return _BuyShopOne1; } set { _BuyShopOne1 = value; _BuyShopOne1.Obfuscate(); } }
|
||||||
ProtectedBool _BuyShopOne2; public bool BuyShopOne2 { get { return _BuyShopOne2; } set { _BuyShopOne2 = value; _BuyShopOne2.Obfuscate(); } }
|
ProtectedBool _BuyShopOne2; public bool BuyShopOne2 { get { return _BuyShopOne2; } set { _BuyShopOne2 = value; _BuyShopOne2.Obfuscate(); } }
|
||||||
|
ProtectedBool _BuyShopDisableOne1; public bool BuyShopDisableOne1 { get { return _BuyShopDisableOne1; } set { _BuyShopDisableOne1 = value; _BuyShopDisableOne1.Obfuscate(); } }
|
||||||
|
ProtectedBool _BuyShopDisableOne2; public bool BuyShopDisableOne2 { get { return _BuyShopDisableOne2; } set { _BuyShopDisableOne2 = value; _BuyShopDisableOne2.Obfuscate(); } }
|
||||||
|
|
||||||
public List<ShopADSaveData> list_ShopLimit = new List<ShopADSaveData>();
|
public List<ShopADSaveData> list_ShopLimit = new List<ShopADSaveData>();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ public class LuckyGameObj : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (isTiltCup && !isCollision && IsAlmostStopped())
|
if (isTiltCup && !isCollision && IsAlmostStopped())
|
||||||
{
|
{
|
||||||
Debug.Log("움직임이 거의 없음");
|
//Debug.Log("움직임이 거의 없음");
|
||||||
Set_Collision(0);
|
Set_Collision(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,11 @@ public class GachaUI : uScrollViewMgr
|
||||||
{
|
{
|
||||||
var cal = GachaAutoRefillTime - InternetTime.Ins.Time;
|
var cal = GachaAutoRefillTime - InternetTime.Ins.Time;
|
||||||
fRefillTime -= Time.deltaTime;
|
fRefillTime -= Time.deltaTime;
|
||||||
texts[3].text = $"{fRefillTime:F2}s";
|
texts[3].text = fRefillTime > 0f ? $"{fRefillTime:F2}s" : "0s";
|
||||||
slider_charge.value = DSUtil.Get_SliderValue((float)cal.TotalSeconds / table_GlobalValue.Ins.Get_Float("GachaAutoRefill_DelayTime"));
|
var fRefillTimeMax = table_GlobalValue.Ins.Get_Float("GachaAutoRefill_DelayTime");
|
||||||
if (cal.TotalSeconds <= 0)
|
if (SaveMgr.Ins.GachaChargeTime_Reduce()) fRefillTimeMax -= fRefillTimeMax * 0.9f;
|
||||||
|
slider_charge.value = DSUtil.Get_SliderValue(fRefillTime / fRefillTimeMax);
|
||||||
|
if (cal.TotalSeconds <= 0 && fRefillTime <= 0f)
|
||||||
{
|
{
|
||||||
SaveMgr.Ins.Add_Money(eMoney.Gacha, table_GlobalValue.Ins.Get_Int("GachaAutoRefill_Amount"));
|
SaveMgr.Ins.Add_Money(eMoney.Gacha, table_GlobalValue.Ins.Get_Int("GachaAutoRefill_Amount"));
|
||||||
SaveMgr.Ins.Save();
|
SaveMgr.Ins.Save();
|
||||||
|
|
@ -147,10 +149,10 @@ public class GachaUI : uScrollViewMgr
|
||||||
|
|
||||||
public void OnClick_Lucky()
|
public void OnClick_Lucky()
|
||||||
{
|
{
|
||||||
//if (SaveMgr.Ins.Check_Money(eMoney.Lucky, table_GlobalValue.Ins.Get_Int("LuckyPoint")))
|
if (SaveMgr.Ins.Check_Money(eMoney.Lucky, table_GlobalValue.Ins.Get_Int("LuckyPoint")))
|
||||||
{
|
{
|
||||||
//SaveMgr.Ins.Add_Money(eMoney.Lucky, -table_GlobalValue.Ins.Get_Int("LuckyPoint"));
|
SaveMgr.Ins.Add_Money(eMoney.Lucky, -table_GlobalValue.Ins.Get_Int("LuckyPoint"));
|
||||||
//SaveMgr.Ins.Save();
|
SaveMgr.Ins.Save();
|
||||||
LobbyUI.Ins.m_Game_Lucky.Set();
|
LobbyUI.Ins.m_Game_Lucky.Set();
|
||||||
Set_UI(false);
|
Set_UI(false);
|
||||||
}
|
}
|
||||||
|
|
@ -227,6 +229,7 @@ public class GachaUI : uScrollViewMgr
|
||||||
Set_UI(true);
|
Set_UI(true);
|
||||||
|
|
||||||
fRefillTime = table_GlobalValue.Ins.Get_Float("GachaAutoRefill_DelayTime");
|
fRefillTime = table_GlobalValue.Ins.Get_Float("GachaAutoRefill_DelayTime");
|
||||||
|
if (SaveMgr.Ins.GachaChargeTime_Reduce()) fRefillTime -= fRefillTime * 0.9f;
|
||||||
GachaAutoRefillTime = InternetTime.Ins.Time.AddSeconds(fRefillTime);
|
GachaAutoRefillTime = InternetTime.Ins.Time.AddSeconds(fRefillTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,18 +6,24 @@ using UnityEngine.UI;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
|
||||||
[CustomEditor(typeof(ShopCard))]
|
[CustomEditor(typeof(ShopCard))]
|
||||||
|
[CanEditMultipleObjects] // 🔑 여러 오브젝트 동시 지원
|
||||||
public class ShopCardEditor : Editor
|
public class ShopCardEditor : Editor
|
||||||
{
|
{
|
||||||
public override void OnInspectorGUI()
|
public override void OnInspectorGUI()
|
||||||
{
|
{
|
||||||
base.OnInspectorGUI();
|
base.OnInspectorGUI();
|
||||||
|
|
||||||
ShopCard shopCard = (ShopCard)target;
|
if (GUILayout.Button("🔄 Auto Link Components (All Selected)"))
|
||||||
|
{
|
||||||
if (GUILayout.Button("Auto Link Components"))
|
foreach (Object obj in targets) // 🔑 선택된 모든 ShopCard 순회
|
||||||
|
{
|
||||||
|
ShopCard shopCard = obj as ShopCard;
|
||||||
|
if (shopCard != null)
|
||||||
{
|
{
|
||||||
shopCard.AutoLink();
|
shopCard.AutoLink();
|
||||||
EditorUtility.SetDirty(shopCard); // 변경 사항 저장
|
EditorUtility.SetDirty(shopCard); // 변경 사항 기록
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -26,11 +32,11 @@ public class ShopCardEditor : Editor
|
||||||
public class ShopCard : MonoBehaviour
|
public class ShopCard : MonoBehaviour
|
||||||
{
|
{
|
||||||
public string m_ID;
|
public string m_ID;
|
||||||
public Image i_shopitem;
|
public Image i_shopitem, i_buymoney;
|
||||||
public TextMeshProUGUI t_name, t_peakefficiency;
|
public TextMeshProUGUI t_name, t_peakefficiency;
|
||||||
public TextMeshProUGUI t_amount, t_goods;
|
public TextMeshProUGUI t_amount, t_goods;
|
||||||
public TextMeshProUGUI t_price, t_limit, t_pricelimit;
|
public TextMeshProUGUI t_price, t_limit, t_pricelimit, t_buymoneyprice;
|
||||||
public GameObject go_btnbuy, go_btnbuylimit, go_initDesc, go_BuyComplete;
|
public GameObject go_btnbuy, go_btnbuylimit, go_btnbuymoney, go_initDesc, go_BuyComplete;
|
||||||
|
|
||||||
shoptabledata m_Data;
|
shoptabledata m_Data;
|
||||||
|
|
||||||
|
|
@ -39,6 +45,7 @@ public class ShopCard : MonoBehaviour
|
||||||
public void AutoLink()
|
public void AutoLink()
|
||||||
{
|
{
|
||||||
i_shopitem = DSUtil.Get_Child_T<Image>(gameObject, "i_shopitem");
|
i_shopitem = DSUtil.Get_Child_T<Image>(gameObject, "i_shopitem");
|
||||||
|
i_buymoney = DSUtil.Get_Child_T<Image>(gameObject, "i_buymoney");
|
||||||
t_name = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_name");
|
t_name = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_name");
|
||||||
t_peakefficiency = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_peakefficiency");
|
t_peakefficiency = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_peakefficiency");
|
||||||
t_amount = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_amount");
|
t_amount = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_amount");
|
||||||
|
|
@ -46,10 +53,12 @@ public class ShopCard : MonoBehaviour
|
||||||
t_price = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_price");
|
t_price = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_price");
|
||||||
t_limit = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_limit");
|
t_limit = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_limit");
|
||||||
t_pricelimit = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_pricelimit");
|
t_pricelimit = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_pricelimit");
|
||||||
|
t_buymoneyprice = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_buymoneyprice");
|
||||||
go_BuyComplete = DSUtil.Get_Child_GameObject(gameObject, "BuyComplete");
|
go_BuyComplete = DSUtil.Get_Child_GameObject(gameObject, "BuyComplete");
|
||||||
go_initDesc = DSUtil.Get_Child_GameObject(gameObject, "go_initDesc");
|
go_initDesc = DSUtil.Get_Child_GameObject(gameObject, "go_initDesc");
|
||||||
go_btnbuy = DSUtil.Get_Child_GameObject(gameObject, "btn_buy");
|
go_btnbuy = DSUtil.Get_Child_GameObject(gameObject, "btn_buy");
|
||||||
go_btnbuylimit = DSUtil.Get_Child_GameObject(gameObject, "btn_buylimit");
|
go_btnbuylimit = DSUtil.Get_Child_GameObject(gameObject, "btn_buylimit");
|
||||||
|
go_btnbuymoney = DSUtil.Get_Child_GameObject(gameObject, "btn_buymoney");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -65,6 +74,13 @@ public class ShopCard : MonoBehaviour
|
||||||
btnlimit.onClick.RemoveAllListeners();
|
btnlimit.onClick.RemoveAllListeners();
|
||||||
btnlimit.onClick.AddListener(OnClick_Button);
|
btnlimit.onClick.AddListener(OnClick_Button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (go_btnbuymoney != null)
|
||||||
|
{
|
||||||
|
var btnbuymoney = go_btnbuymoney.GetComponent<Button>();
|
||||||
|
btnbuymoney.onClick.RemoveAllListeners();
|
||||||
|
btnbuymoney.onClick.AddListener(OnClick_Button);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnEnable()
|
private void OnEnable()
|
||||||
|
|
@ -77,14 +93,16 @@ public class ShopCard : MonoBehaviour
|
||||||
if (t_name != null) t_name.text = m_Data.s_Name;
|
if (t_name != null) t_name.text = m_Data.s_Name;
|
||||||
t_goods.text = m_Data.s_Items;
|
t_goods.text = m_Data.s_Items;
|
||||||
if (go_initDesc != null) go_initDesc.SetActive(m_Data.n_Limit > 0);
|
if (go_initDesc != null) go_initDesc.SetActive(m_Data.n_Limit > 0);
|
||||||
|
|
||||||
|
if (go_btnbuylimit != null) go_btnbuy.SetActive(true);
|
||||||
|
if (go_btnbuylimit != null) go_btnbuylimit.SetActive(false);
|
||||||
|
if (go_btnbuymoney != null) go_btnbuymoney.SetActive(false);
|
||||||
if (m_Data.n_Limit > 0)
|
if (m_Data.n_Limit > 0)
|
||||||
{
|
{
|
||||||
go_btnbuy.SetActive(true);
|
|
||||||
if (go_btnbuylimit != null)
|
if (go_btnbuylimit != null)
|
||||||
{
|
{
|
||||||
|
if (go_btnbuy != null) go_btnbuy.SetActive(false);
|
||||||
go_btnbuylimit.SetActive(true);
|
go_btnbuylimit.SetActive(true);
|
||||||
if (go_btnbuy != null)
|
|
||||||
go_btnbuy.SetActive(false);
|
|
||||||
t_pricelimit.text = m_Data.e_BuyType == eShopBuyType.IAP ? $"{m_Data.n_Price}원" : m_Data.n_Price.ToString();
|
t_pricelimit.text = m_Data.e_BuyType == eShopBuyType.IAP ? $"{m_Data.n_Price}원" : m_Data.n_Price.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -95,13 +113,41 @@ public class ShopCard : MonoBehaviour
|
||||||
t_price.text = m_Data.e_BuyType == eShopBuyType.IAP ? $"{m_Data.n_Price}원" : m_Data.n_Price.ToString();
|
t_price.text = m_Data.e_BuyType == eShopBuyType.IAP ? $"{m_Data.n_Price}원" : m_Data.n_Price.ToString();
|
||||||
t_price.transform.localPosition = !string.IsNullOrEmpty(m_Data.s_PeakEffective) ? Vector3.up * 10f : Vector3.zero;
|
t_price.transform.localPosition = !string.IsNullOrEmpty(m_Data.s_PeakEffective) ? Vector3.up * 10f : Vector3.zero;
|
||||||
}
|
}
|
||||||
|
if (m_Data.e_BuyType == eShopBuyType.Coin)
|
||||||
|
Set_Btn_bybuyMoney(eMoney.Gacha);
|
||||||
|
else if (m_Data.e_BuyType == eShopBuyType.Heart)
|
||||||
|
Set_Btn_bybuyMoney(eMoney.AlbumOpen);
|
||||||
}
|
}
|
||||||
Set_UI();
|
Set_UI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Set_Btn_bybuyMoney(eMoney money)
|
||||||
|
{
|
||||||
|
i_buymoney.sprite = UIAtlasMgr.Ins.Get_Sprite(money);
|
||||||
|
t_buymoneyprice.text = m_Data.n_Price.ToString();
|
||||||
|
if (go_btnbuylimit != null) go_btnbuy.SetActive(false);
|
||||||
|
if (go_btnbuylimit != null) go_btnbuylimit.SetActive(false);
|
||||||
|
if (go_btnbuymoney != null) go_btnbuymoney.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
void Set_UI()
|
void Set_UI()
|
||||||
{
|
{
|
||||||
if (go_BuyComplete != null) go_BuyComplete.SetActive(!SaveMgr.Ins.CanBuyShopPackage(m_Data));
|
if (go_BuyComplete != null) go_BuyComplete.SetActive(!SaveMgr.Ins.CanBuyShopPackage(m_Data));
|
||||||
|
switch (m_Data.e_InAppInitType)
|
||||||
|
{
|
||||||
|
case eInAppInitType.One1:
|
||||||
|
case eInAppInitType.One2:
|
||||||
|
if (!SaveMgr.Ins.CanBuyShopPackage(m_Data))
|
||||||
|
gameObject.SetActive(false);
|
||||||
|
transform.parent.parent.gameObject.SetActive(SaveMgr.Ins.Shop_FullPackage_Active());
|
||||||
|
break;
|
||||||
|
case eInAppInitType.Disable_Buy1:
|
||||||
|
case eInAppInitType.Disable_Buy2:
|
||||||
|
if (!SaveMgr.Ins.CanBuyShopPackage(m_Data))
|
||||||
|
gameObject.SetActive(false);
|
||||||
|
transform.parent.parent.gameObject.SetActive(SaveMgr.Ins.Shop_FullPackage_Active());
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (t_limit != null) t_limit.text = $"{SaveMgr.Ins.Get_ShopLimitCount(m_Data.s_ID)}/{m_Data.n_Limit}";
|
if (t_limit != null) t_limit.text = $"{SaveMgr.Ins.Get_ShopLimitCount(m_Data.s_ID)}/{m_Data.n_Limit}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -122,7 +168,7 @@ public class ShopCard : MonoBehaviour
|
||||||
break;
|
break;
|
||||||
case eShopBuyType.AD:
|
case eShopBuyType.AD:
|
||||||
//if (SaveMgr.Ins.CanShowShopAD())
|
//if (SaveMgr.Ins.CanShowShopAD())
|
||||||
if (SaveMgr.Ins.Get_ShopLimitCount(m_Data.s_ID) < m_Data.n_Limit)
|
if (m_Data.n_Limit == 0 || SaveMgr.Ins.Get_ShopLimitCount(m_Data.s_ID) < m_Data.n_Limit)
|
||||||
{
|
{
|
||||||
ADInfo.Ins.Show_AD(false, () =>
|
ADInfo.Ins.Show_AD(false, () =>
|
||||||
{
|
{
|
||||||
|
|
@ -135,7 +181,7 @@ public class ShopCard : MonoBehaviour
|
||||||
LobbyUI.Ins.m_ToastUI.Set("광고 시청 횟수가 없습니다.");
|
LobbyUI.Ins.m_ToastUI.Set("광고 시청 횟수가 없습니다.");
|
||||||
break;
|
break;
|
||||||
case eShopBuyType.Coin:
|
case eShopBuyType.Coin:
|
||||||
if (SaveMgr.Ins.Get_ShopLimitCount(m_Data.s_ID) < m_Data.n_Limit)
|
if (m_Data.n_Limit == 0 || SaveMgr.Ins.Get_ShopLimitCount(m_Data.s_ID) < m_Data.n_Limit)
|
||||||
{
|
{
|
||||||
if (SaveMgr.Ins.Check_Money(eMoney.Gacha, m_Data.n_Price))
|
if (SaveMgr.Ins.Check_Money(eMoney.Gacha, m_Data.n_Price))
|
||||||
{
|
{
|
||||||
|
|
@ -148,6 +194,20 @@ public class ShopCard : MonoBehaviour
|
||||||
else
|
else
|
||||||
LobbyUI.Ins.m_ToastUI.Set("오늘은 더 이상 구매하실 수 없습니다.");
|
LobbyUI.Ins.m_ToastUI.Set("오늘은 더 이상 구매하실 수 없습니다.");
|
||||||
break;
|
break;
|
||||||
|
case eShopBuyType.Heart:
|
||||||
|
if (m_Data.n_Limit == 0 || SaveMgr.Ins.Get_ShopLimitCount(m_Data.s_ID) < m_Data.n_Limit)
|
||||||
|
{
|
||||||
|
if (SaveMgr.Ins.Check_Money(eMoney.AlbumOpen, m_Data.n_Price))
|
||||||
|
{
|
||||||
|
SaveMgr.Ins.Add_Money(eMoney.AlbumOpen, -m_Data.n_Price);
|
||||||
|
SaveMgr.Ins.Set_ShopReward(m_Data);
|
||||||
|
LobbyUI.Ins.m_ToastUI.Set(Get_BuyItemMsg());
|
||||||
|
Set_UI();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
LobbyUI.Ins.m_ToastUI.Set("오늘은 더 이상 구매하실 수 없습니다.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -179,6 +239,12 @@ public class ShopCard : MonoBehaviour
|
||||||
msg += $"광고 제거권을 획득했습니다.";
|
msg += $"광고 제거권을 획득했습니다.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_Data.n_BonusGameRefill > 0)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
msg += $"보너스 게임 리필 횟수가 {m_Data.n_BonusGameRefill} 추가 되었습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
if (m_Data.b_InfinityMiniGame)
|
if (m_Data.b_InfinityMiniGame)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue