상점 완료
This commit is contained in:
parent
599cef97b3
commit
053dd728e4
|
|
@ -1,9 +1,9 @@
|
||||||
[{"s_ID": "com.fgb.weeklypackage", "e_BuyType": "IAP", "n_Price": "1000", "s_PeakEffective": "최대 효율 111%", "s_Items": "코인 x00
|
[{"s_ID": "com.fgb.weeklypackage", "e_InAppInitType": "Week", "e_BuyType": "IAP", "n_Price": "1000", "s_PeakEffective": "최대 효율 111%", "s_Items": "코인 x00
|
||||||
채팅 코인 x00", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.minigamepacakge", "e_BuyType": "IAP", "n_Price": "25000", "s_PeakEffective": "최대 효율 222%", "s_Items": "보너스 확률 +00%
|
채팅 코인 x00", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.minigamepacakge", "e_InAppInitType": "Mini_One", "e_BuyType": "IAP", "n_Price": "25000", "s_PeakEffective": "최대 효율 222%", "s_Items": "보너스 확률 +00%
|
||||||
코인 x00", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.buyone1", "e_BuyType": "IAP", "n_Price": "9900", "s_PeakEffective": "123%", "s_Items": "코인 x000
|
코인 x00", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.buyone1", "e_InAppInitType": "One1", "e_BuyType": "IAP", "n_Price": "9900", "s_PeakEffective": "123%", "s_Items": "코인 x000
|
||||||
채팅 코인 x000", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.buyone2", "e_BuyType": "IAP", "n_Price": "55000", "s_PeakEffective": "135%", "s_Items": "코인 x000
|
채팅 코인 x000", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.buyone2", "e_InAppInitType": "One2", "e_BuyType": "IAP", "n_Price": "55000", "s_PeakEffective": "135%", "s_Items": "코인 x000
|
||||||
가챠 코인 x000", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatbot1", "e_BuyType": "IAP", "n_Price": "5500", "s_PeakEffective": "105%", "s_Items": "코인 x00
|
가챠 코인 x000", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatbot1", "e_InAppInitType": "None", "e_BuyType": "IAP", "n_Price": "5500", "s_PeakEffective": "105%", "s_Items": "코인 x00
|
||||||
채팅 코인 x00", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatbot2", "e_BuyType": "IAP", "n_Price": "9900", "s_PeakEffective": "102%", "s_Items": "보너스 확률 +00%
|
채팅 코인 x00", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatbot2", "e_InAppInitType": "None", "e_BuyType": "IAP", "n_Price": "9900", "s_PeakEffective": "102%", "s_Items": "보너스 확률 +00%
|
||||||
코인 x00", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatbot3", "e_BuyType": "IAP", "n_Price": "22000", "s_PeakEffective": "100%", "s_Items": "코인 x000
|
코인 x00", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatbot3", "e_InAppInitType": "None", "e_BuyType": "IAP", "n_Price": "22000", "s_PeakEffective": "100%", "s_Items": "코인 x000
|
||||||
채팅 코인 x000", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatbot4", "e_BuyType": "IAP", "n_Price": "55000", "s_PeakEffective": "99%", "s_Items": "코인 x000
|
채팅 코인 x000", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatbot4", "e_InAppInitType": "None", "e_BuyType": "IAP", "n_Price": "55000", "s_PeakEffective": "99%", "s_Items": "코인 x000
|
||||||
가챠 코인 x000", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.gacha1", "e_BuyType": "IAP", "n_Price": "1100", "s_PeakEffective": "", "s_Items": "x20", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "20", "n_ADSec": "0"}, {"s_ID": "com.fgb.gacha2", "e_BuyType": "IAP", "n_Price": "5500", "s_PeakEffective": "", "s_Items": "x110", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "110", "n_ADSec": "0"}, {"s_ID": "com.fgb.gacha3", "e_BuyType": "IAP", "n_Price": "27500", "s_PeakEffective": "", "s_Items": "x600", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "600", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatcoin1", "e_BuyType": "IAP", "n_Price": "1100", "s_PeakEffective": "", "s_Items": "x10", "n_RewardHeart": "0", "n_RewardChatCoin": "10", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatcoin2", "e_BuyType": "IAP", "n_Price": "5500", "s_PeakEffective": "", "s_Items": "x55", "n_RewardHeart": "0", "n_RewardChatCoin": "55", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatcoin3", "e_BuyType": "IAP", "n_Price": "27500", "s_PeakEffective": "", "s_Items": "x300", "n_RewardHeart": "0", "n_RewardChatCoin": "300", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "ad.chatcoin", "e_BuyType": "AD", "n_Price": "0", "s_PeakEffective": "", "s_Items": "x3", "n_RewardHeart": "0", "n_RewardChatCoin": "3", "n_RewardGacha": "0", "n_ADSec": "600"}, {"s_ID": "buy.chatcoin", "e_BuyType": "Coin", "n_Price": "50", "s_PeakEffective": "", "s_Items": "x1", "n_RewardHeart": "0", "n_RewardChatCoin": "1", "n_RewardGacha": "0", "n_ADSec": "0"}]
|
가챠 코인 x000", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.gacha1", "e_InAppInitType": "None", "e_BuyType": "IAP", "n_Price": "1100", "s_PeakEffective": "", "s_Items": "x20", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "20", "n_ADSec": "0"}, {"s_ID": "com.fgb.gacha2", "e_InAppInitType": "None", "e_BuyType": "IAP", "n_Price": "5500", "s_PeakEffective": "", "s_Items": "x110", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "110", "n_ADSec": "0"}, {"s_ID": "com.fgb.gacha3", "e_InAppInitType": "None", "e_BuyType": "IAP", "n_Price": "27500", "s_PeakEffective": "", "s_Items": "x600", "n_RewardHeart": "0", "n_RewardChatCoin": "0", "n_RewardGacha": "600", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatcoin1", "e_InAppInitType": "None", "e_BuyType": "IAP", "n_Price": "1100", "s_PeakEffective": "", "s_Items": "x10", "n_RewardHeart": "0", "n_RewardChatCoin": "10", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatcoin2", "e_InAppInitType": "None", "e_BuyType": "IAP", "n_Price": "5500", "s_PeakEffective": "", "s_Items": "x55", "n_RewardHeart": "0", "n_RewardChatCoin": "55", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "com.fgb.chatcoin3", "e_InAppInitType": "None", "e_BuyType": "IAP", "n_Price": "27500", "s_PeakEffective": "", "s_Items": "x300", "n_RewardHeart": "0", "n_RewardChatCoin": "300", "n_RewardGacha": "0", "n_ADSec": "0"}, {"s_ID": "ad.chatcoin", "e_InAppInitType": "None", "e_BuyType": "AD", "n_Price": "0", "s_PeakEffective": "", "s_Items": "x3", "n_RewardHeart": "0", "n_RewardChatCoin": "3", "n_RewardGacha": "0", "n_ADSec": "600"}, {"s_ID": "buy.chatcoin", "e_InAppInitType": "None", "e_BuyType": "Coin", "n_Price": "50", "s_PeakEffective": "", "s_Items": "x1", "n_RewardHeart": "0", "n_RewardChatCoin": "1", "n_RewardGacha": "0", "n_ADSec": "0"}]
|
||||||
Binary file not shown.
|
|
@ -3,12 +3,14 @@ using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public enum eInAppInitType { None, Week, Mini_One, One1, One2 }
|
||||||
public enum eShopBuyType { IAP, AD, Coin }
|
public enum eShopBuyType { IAP, AD, Coin }
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class shoptabledata
|
public class shoptabledata
|
||||||
{
|
{
|
||||||
public string s_ID, s_PeakEffective, s_Items;
|
public string s_ID, s_PeakEffective, s_Items;
|
||||||
|
public eInAppInitType e_InAppInitType;
|
||||||
public eShopBuyType e_BuyType;
|
public eShopBuyType e_BuyType;
|
||||||
ProtectedInt32 _Price; public int n_Price { get { return _Price; } set { _Price = value; _Price.Obfuscate(); } }
|
ProtectedInt32 _Price; public int n_Price { get { return _Price; } set { _Price = value; _Price.Obfuscate(); } }
|
||||||
ProtectedInt32 _RewardHeart; public int n_RewardHeart { get { return _RewardHeart; } set { _RewardHeart = value; _RewardHeart.Obfuscate(); } }
|
ProtectedInt32 _RewardHeart; public int n_RewardHeart { get { return _RewardHeart; } set { _RewardHeart = value; _RewardHeart.Obfuscate(); } }
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -82,6 +82,7 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Get_DoY() { return m_SaveData.LastDoY; }
|
public int Get_DoY() { return m_SaveData.LastDoY; }
|
||||||
|
public int Get_WOY() { return m_SaveData.WeekOfYear; }
|
||||||
|
|
||||||
public void Add_Money(eMoney money, int add = 1)
|
public void Add_Money(eMoney money, int add = 1)
|
||||||
{
|
{
|
||||||
|
|
@ -122,6 +123,14 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
|
|
||||||
Save();
|
Save();
|
||||||
}
|
}
|
||||||
|
public void WeeklyCheck(int woy)
|
||||||
|
{
|
||||||
|
m_SaveData.WeekOfYear = woy;
|
||||||
|
|
||||||
|
m_SaveData.BuyShopWeekly = false;
|
||||||
|
|
||||||
|
Save();
|
||||||
|
}
|
||||||
public void Add_AttendanceDay() { ++m_SaveData.Attendance; }
|
public void Add_AttendanceDay() { ++m_SaveData.Attendance; }
|
||||||
public int Get_AttendanceDay() { return m_SaveData.Attendance; }
|
public int Get_AttendanceDay() { return m_SaveData.Attendance; }
|
||||||
public bool CanGet_Attandance(int day) { return Get_AttendanceDay() < day && m_SaveData.AttendanceDoY != m_SaveData.LastDoY; }
|
public bool CanGet_Attandance(int day) { return Get_AttendanceDay() < day && m_SaveData.AttendanceDoY != m_SaveData.LastDoY; }
|
||||||
|
|
@ -160,13 +169,34 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
m_SaveData.ShopADTime = InternetTime.Ins.Time.AddSeconds(sec);
|
m_SaveData.ShopADTime = InternetTime.Ins.Time.AddSeconds(sec);
|
||||||
Save();
|
Save();
|
||||||
}
|
}
|
||||||
}
|
public bool CanBuyShopPackage(eInAppInitType inittype)
|
||||||
|
{
|
||||||
|
switch (inittype)
|
||||||
|
{
|
||||||
|
default: return true;
|
||||||
|
case eInAppInitType.Week: return !m_SaveData.BuyShopWeekly;
|
||||||
|
case eInAppInitType.Mini_One: return !m_SaveData.BuyShopMiniGame;
|
||||||
|
case eInAppInitType.One1: return !m_SaveData.BuyShopOne1;
|
||||||
|
case eInAppInitType.One2: return !m_SaveData.BuyShopOne2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void Set_ShopInit(eInAppInitType inittype)
|
||||||
|
{
|
||||||
|
switch (inittype)
|
||||||
|
{
|
||||||
|
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.One2: m_SaveData.BuyShopOne2 = true; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class SaveData
|
public class SaveData
|
||||||
{
|
{
|
||||||
public bool bSound, bBgm;
|
public bool bSound, bBgm;
|
||||||
|
|
||||||
ProtectedInt32 _LastDoY; public int LastDoY { get { return _LastDoY; } set { _LastDoY = value; _LastDoY.Obfuscate(); } }
|
ProtectedInt32 _LastDoY; public int LastDoY { get { return _LastDoY; } set { _LastDoY = value; _LastDoY.Obfuscate(); } }
|
||||||
|
ProtectedInt32 _WeekOfYear; public int WeekOfYear { get { return _WeekOfYear; } set { _WeekOfYear = value; _WeekOfYear.Obfuscate(); } }
|
||||||
ProtectedInt32 _GirlSelectIndex; public int SelectGirlID { get { return _GirlSelectIndex; } set { _GirlSelectIndex = value; _GirlSelectIndex.Obfuscate(); } }
|
ProtectedInt32 _GirlSelectIndex; public int SelectGirlID { get { return _GirlSelectIndex; } set { _GirlSelectIndex = value; _GirlSelectIndex.Obfuscate(); } }
|
||||||
ProtectedInt32 _GirlUnLockIndex; public int GirlUnLockIndex { get { return _GirlUnLockIndex; } set { _GirlUnLockIndex = value; _GirlUnLockIndex.Obfuscate(); } }
|
ProtectedInt32 _GirlUnLockIndex; public int GirlUnLockIndex { get { return _GirlUnLockIndex; } set { _GirlUnLockIndex = value; _GirlUnLockIndex.Obfuscate(); } }
|
||||||
ProtectedInt32 _AttendanceDoY; public int AttendanceDoY { get { return _AttendanceDoY; } set { _AttendanceDoY = value; _AttendanceDoY.Obfuscate(); } }
|
ProtectedInt32 _AttendanceDoY; public int AttendanceDoY { get { return _AttendanceDoY; } set { _AttendanceDoY = value; _AttendanceDoY.Obfuscate(); } }
|
||||||
|
|
@ -178,4 +208,10 @@ public class SaveData
|
||||||
ProtectedInt32 _MoneyLucky; public int MoneyLucky { get { return _MoneyLucky; } set { _MoneyLucky = value; _MoneyLucky.Obfuscate(); } }
|
ProtectedInt32 _MoneyLucky; public int MoneyLucky { get { return _MoneyLucky; } set { _MoneyLucky = value; _MoneyLucky.Obfuscate(); } }
|
||||||
|
|
||||||
ProtectedDateTime _ShopADTime; public DateTime ShopADTime { get { return _ShopADTime; } set { _ShopADTime = value; _ShopADTime.Obfuscate(); } }
|
ProtectedDateTime _ShopADTime; public DateTime ShopADTime { get { return _ShopADTime; } set { _ShopADTime = value; _ShopADTime.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 _BuyShopOne2; public bool BuyShopOne2 { get { return _BuyShopOne2; } set { _BuyShopOne2 = value; _BuyShopOne2.Obfuscate(); } }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -9,6 +9,7 @@ public class ShopCard : MonoBehaviour
|
||||||
public TextMeshProUGUI t_peakefficiency;
|
public TextMeshProUGUI t_peakefficiency;
|
||||||
public TextMeshProUGUI t_goods;
|
public TextMeshProUGUI t_goods;
|
||||||
public TextMeshProUGUI t_price;
|
public TextMeshProUGUI t_price;
|
||||||
|
public GameObject go_BuyComplete;
|
||||||
|
|
||||||
shoptabledata m_Data;
|
shoptabledata m_Data;
|
||||||
|
|
||||||
|
|
@ -19,6 +20,7 @@ public class ShopCard : MonoBehaviour
|
||||||
t_peakefficiency = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_peakefficiency");
|
t_peakefficiency = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_peakefficiency");
|
||||||
t_goods = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_goods");
|
t_goods = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_goods");
|
||||||
t_price = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_price");
|
t_price = DSUtil.Get_Child_T<TextMeshProUGUI>(gameObject, "t_price");
|
||||||
|
go_BuyComplete = DSUtil.Get_Child_GameObject(gameObject, "BuyComplete");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -35,6 +37,15 @@ public class ShopCard : MonoBehaviour
|
||||||
if (t_peakefficiency != null) t_peakefficiency.text = m_Data.s_PeakEffective;
|
if (t_peakefficiency != null) t_peakefficiency.text = m_Data.s_PeakEffective;
|
||||||
t_goods.text = m_Data.s_Items;
|
t_goods.text = m_Data.s_Items;
|
||||||
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();
|
||||||
|
Set_UI();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Set_UI()
|
||||||
|
{
|
||||||
|
if (go_BuyComplete != null)
|
||||||
|
{
|
||||||
|
go_BuyComplete.SetActive(!SaveMgr.Ins.CanBuyShopPackage(m_Data.e_InAppInitType));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnClick_Button()
|
public void OnClick_Button()
|
||||||
|
|
@ -44,7 +55,15 @@ public class ShopCard : MonoBehaviour
|
||||||
case eShopBuyType.IAP:
|
case eShopBuyType.IAP:
|
||||||
InappInfo.Ins.BuyProduct(m_ID, () =>
|
InappInfo.Ins.BuyProduct(m_ID, () =>
|
||||||
{
|
{
|
||||||
|
SaveMgr.Ins.Add_Money(eMoney.AlbumOpen, m_Data.n_RewardHeart);
|
||||||
|
SaveMgr.Ins.Add_Money(eMoney.Chat, m_Data.n_RewardChatCoin);
|
||||||
|
SaveMgr.Ins.Add_Money(eMoney.Gacha, m_Data.n_RewardGacha);
|
||||||
|
SaveMgr.Ins.Set_ShopInit(m_Data.e_InAppInitType);
|
||||||
|
SaveMgr.Ins.Save();
|
||||||
|
|
||||||
|
LobbyUI.Ins.m_ToastUI.Set(Get_BuyItemMsg());
|
||||||
|
|
||||||
|
Set_UI();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case eShopBuyType.AD:
|
case eShopBuyType.AD:
|
||||||
|
|
@ -67,4 +86,30 @@ public class ShopCard : MonoBehaviour
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string Get_BuyItemMsg()
|
||||||
|
{
|
||||||
|
var msg = "";
|
||||||
|
|
||||||
|
if (m_Data.n_RewardHeart > 0)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
msg += $"앨범 오픈 재화 {m_Data.n_RewardHeart}개를 획득했습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_Data.n_RewardChatCoin > 0)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
msg += $"채팅 코인 {m_Data.n_RewardChatCoin}개를 획득했습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_Data.n_RewardGacha > 0)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(msg)) msg += "\n";
|
||||||
|
msg += $"가챠 코인 {m_Data.n_RewardGacha}개를 획득했습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,12 +3,14 @@ using UnityEngine;
|
||||||
|
|
||||||
public class ToastUI : MonoBehaviour
|
public class ToastUI : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
public RectTransform rt_bg;
|
||||||
public TextMeshProUGUI t_mgs;
|
public TextMeshProUGUI t_mgs;
|
||||||
|
|
||||||
public void Set(string text)
|
public void Set(string text)
|
||||||
{
|
{
|
||||||
gameObject.SetActive(true);
|
gameObject.SetActive(true);
|
||||||
t_mgs.text = text;
|
t_mgs.text = text;
|
||||||
|
rt_bg.sizeDelta = new Vector2(rt_bg.sizeDelta.x, t_mgs.preferredHeight + 50);
|
||||||
|
|
||||||
if (IsInvoking()) CancelInvoke();
|
if (IsInvoking()) CancelInvoke();
|
||||||
Invoke("Off", 3f);
|
Invoke("Off", 3f);
|
||||||
|
|
|
||||||
|
|
@ -954,6 +954,21 @@ public static partial class DSUtil
|
||||||
if (lst == null) return null;
|
if (lst == null) return null;
|
||||||
return lst.FirstOrDefault(t => t.name == name);
|
return lst.FirstOrDefault(t => t.name == name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static GameObject Get_Child_GameObject(GameObject parent, string name)
|
||||||
|
{
|
||||||
|
foreach (Transform child in parent.transform)
|
||||||
|
{
|
||||||
|
if (child.name == name)
|
||||||
|
return child.gameObject;
|
||||||
|
|
||||||
|
// 재귀 탐색
|
||||||
|
GameObject result = Get_Child_GameObject(child.gameObject, name);
|
||||||
|
if (result != null)
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class NumberFormatter
|
public class NumberFormatter
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,9 @@ public class DataCheckMgr : MyCoroutine
|
||||||
// 게임 접속 중에 다음날이 됐을 때
|
// 게임 접속 중에 다음날이 됐을 때
|
||||||
if (!checkinit && SaveMgr.Ins.Get_DoY() != InternetTime.Ins.Time.DayOfYear)
|
if (!checkinit && SaveMgr.Ins.Get_DoY() != InternetTime.Ins.Time.DayOfYear)
|
||||||
SaveMgr.Ins.DailyCheck();
|
SaveMgr.Ins.DailyCheck();
|
||||||
|
var woy = SamplesCalendar.Get_WeekOfYear(InternetTime.Ins.Time);
|
||||||
|
if (woy != SaveMgr.Ins.Get_WOY())
|
||||||
|
SaveMgr.Ins.WeeklyCheck(woy);
|
||||||
|
|
||||||
//if (checkinit && !callinit)
|
//if (checkinit && !callinit)
|
||||||
//{
|
//{
|
||||||
|
|
@ -121,33 +124,6 @@ public class SamplesCalendar
|
||||||
CalendarWeekRule myCWR = myCI.DateTimeFormat.CalendarWeekRule;
|
CalendarWeekRule myCWR = myCI.DateTimeFormat.CalendarWeekRule;
|
||||||
DayOfWeek myFirstDOW = DayOfWeek.Monday;
|
DayOfWeek myFirstDOW = DayOfWeek.Monday;
|
||||||
|
|
||||||
//Debug.LogFormat("The CalendarWeekRule used for the ko-KR culture is {0}.", myCWR);
|
|
||||||
//Debug.LogFormat("The FirstDayOfWeek used for the ko-KR culture is {0}.", myFirstDOW);
|
|
||||||
//Debug.LogFormat("Therefore, the current week is Week {0} of the current year.", myCal.GetWeekOfYear(_dt, myCWR, myFirstDOW));
|
|
||||||
|
|
||||||
//DateTime LastDay = new DateTime(_dt.Year, 1, 1);
|
|
||||||
//Debug.LogFormat("(1,1) There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year);
|
|
||||||
//LastDay = new DateTime(_dt.Year, 1, 2);
|
|
||||||
//Debug.LogFormat("(1,2) There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year);
|
|
||||||
//LastDay = new DateTime(_dt.Year, 6, 30);
|
|
||||||
//Debug.LogFormat("(6,30)There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year);
|
|
||||||
//LastDay = new DateTime(_dt.Year, 7, 1);
|
|
||||||
//Debug.LogFormat("(7,1)There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year);
|
|
||||||
//LastDay = new DateTime(_dt.Year, 7, 2);
|
|
||||||
//Debug.LogFormat("(7,2)There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year);
|
|
||||||
//LastDay = new DateTime(_dt.Year, 7, 3);
|
|
||||||
//Debug.LogFormat("(7,3)There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year);
|
|
||||||
|
|
||||||
//// Displays the total number of weeks in the current year.
|
|
||||||
//LastDay = new DateTime(_dt.Year, 12, 30);
|
|
||||||
//Debug.LogFormat("(12,30)There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year);
|
|
||||||
//LastDay = new DateTime(_dt.Year, 12, 31);
|
|
||||||
//Debug.LogFormat("(12,31)There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year);
|
|
||||||
//LastDay = new DateTime(_dt.Year + 1, 1, 1);
|
|
||||||
//Debug.LogFormat("(1,1)There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year);
|
|
||||||
//LastDay = new DateTime(_dt.Year + 1, 1, 2);
|
|
||||||
//Debug.LogFormat("(1,2)There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year);
|
|
||||||
|
|
||||||
return myCal.GetWeekOfYear(_dt, myCWR, myFirstDOW);
|
return myCal.GetWeekOfYear(_dt, myCWR, myFirstDOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue