From 7d9cfa7269a5d38bd030f568adcfcc00c2525eaa Mon Sep 17 00:00:00 2001 From: Ino Date: Sat, 20 Dec 2025 12:48:28 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B8=EC=95=B1=20=EA=B2=B0=EC=A0=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EC=A7=80=EA=B8=89=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ResWork/Table/table_shop.cs | 52 ++++++++++++++++++ Assets/Resources/VersionCode.txt | 2 +- .../Scripts/AttachToGameObject/InappInfo.cs | 15 +++--- Assets/Scripts/AttachToGameObject/SaveMgr.cs | 19 +++++++ Assets/Scripts/UI/ShopCard.cs | 53 +------------------ 5 files changed, 81 insertions(+), 60 deletions(-) diff --git a/Assets/ResWork/Table/table_shop.cs b/Assets/ResWork/Table/table_shop.cs index bee1c27..630bb62 100644 --- a/Assets/ResWork/Table/table_shop.cs +++ b/Assets/ResWork/Table/table_shop.cs @@ -29,6 +29,58 @@ public class shoptabledata if (n_RewardGacha > 0) return n_RewardGacha.ToString(); return ""; } + + public string Get_BuyItemMsg() + { + var msg = ""; + + if (n_RewardHeart > 0) + { + if (!string.IsNullOrEmpty(msg)) msg += "\n"; + msg += $"ٹ ȭ {n_RewardHeart} ȹ߽ϴ."; + } + + if (n_RewardChatCoin > 0) + { + if (!string.IsNullOrEmpty(msg)) msg += "\n"; + msg += $"ä {n_RewardChatCoin} ȹ߽ϴ."; + } + + if (n_RewardGacha > 0) + { + if (!string.IsNullOrEmpty(msg)) msg += "\n"; + msg += $"̱ ȭ {n_RewardGacha} ȹ߽ϴ."; + } + + if (b_AdRemove) + { + if (!string.IsNullOrEmpty(msg)) msg += "\n"; + msg += $" ű ȹ߽ϴ."; + } + + //if (m_Data.n_BonusGameRefill > 0) + //{ + // if (!string.IsNullOrEmpty(msg)) msg += "\n"; + // msg += $"ʽ Ƚ {m_Data.n_BonusGameRefill} ߰ Ǿϴ."; + //} + + if (b_InfinityMiniGame) + { + if (!string.IsNullOrEmpty(msg)) msg += "\n"; + msg += $"̴ ȹ߽ϴ.\n"; + msg += $"̴ ǹ ӽð 2 ߽ϴ."; + } + + if (b_LuckyGameCharge) + { + if (!string.IsNullOrEmpty(msg)) msg += "\n"; + msg += $"̱ 50% ߽ϴ.\n"; + msg += $"̱ Ȯ ߽ϴ."; + } + + if (string.IsNullOrEmpty(msg)) msg = " ϴ.\n ּ!"; + return msg; + } } public class table_shop : table_base diff --git a/Assets/Resources/VersionCode.txt b/Assets/Resources/VersionCode.txt index 56a6051..bf0d87a 100644 --- a/Assets/Resources/VersionCode.txt +++ b/Assets/Resources/VersionCode.txt @@ -1 +1 @@ -1 \ No newline at end of file +4 \ No newline at end of file diff --git a/Assets/Scripts/AttachToGameObject/InappInfo.cs b/Assets/Scripts/AttachToGameObject/InappInfo.cs index 6624128..1c76685 100644 --- a/Assets/Scripts/AttachToGameObject/InappInfo.cs +++ b/Assets/Scripts/AttachToGameObject/InappInfo.cs @@ -1,11 +1,11 @@ -using OneStore.Auth; -using OneStore.Common; -using OneStore.Purchasing; using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using OneStore.Auth; +using OneStore.Common; +using OneStore.Purchasing; using UnityEngine; using UnityEngine.Purchasing; @@ -15,7 +15,7 @@ public class InappInfo : MonoBehaviourSingletonTemplate StoreController m_StoreController; // 원스토어 - string onstore_publickey = ""; + string onstore_publickey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVjiMhlWYsiHCTLA01r6F+7tlFtaqU5p2b/wx32NSGqZm0GGCwyEFcGGtKP0eE5/UAS9qj2EG8AWV3OmLn4SViYGW8UIS1I01Az5HfWNrrmL31cy/pND+PwMltx4vmAUBRmlGp1ysRVi5/17VF4mQlAzNdUeq30aYQncU0I6Xq3QIDAQAB"; PurchaseClientImpl m_PurchaseClientImpl; OneStoreIapCallBack m_OneStoreIapCallBack = new OneStoreIapCallBack(); @@ -164,9 +164,10 @@ public class InappInfo : MonoBehaviourSingletonTemplate public void OnConsumeSucceeded(PurchaseData purchase) { Debug.Log("OnConsumeSucceeded " + purchase.ProductId); - act_success?.Invoke(); - //GameManager.IAP.AddProductItem(purchase.ProductId); - //GameManager.UI.ShowNStackPopup(EPopupType.SuccessIAPPopup); + if (act_success != null) + act_success(); + else + SaveMgr.Ins.list_inapp.Add(purchase.ProductId); } public void OnManageRecurringProduct(IapResult iapResult, PurchaseData purchase, RecurringAction action) diff --git a/Assets/Scripts/AttachToGameObject/SaveMgr.cs b/Assets/Scripts/AttachToGameObject/SaveMgr.cs index d645b8a..aff0218 100644 --- a/Assets/Scripts/AttachToGameObject/SaveMgr.cs +++ b/Assets/Scripts/AttachToGameObject/SaveMgr.cs @@ -11,6 +11,8 @@ public class SaveMgr : MonoBehaviourSingletonTemplate public SaveData m_SaveData; public ProtectedInt32 m_SelectMiniGameTab, m_SelectMiniGameGirl; + public List list_inapp = new List(); + IEnumerator Start() { while (true) @@ -26,6 +28,23 @@ public class SaveMgr : MonoBehaviourSingletonTemplate SoundInfo.Ins.Play_OneShot(eSound.s012_Title); while (!LobbyUI.Ins) yield return null; LobbyUI.Ins.Set_Money(); + + string inappmsg = ""; + while (true) + { + yield return null; + for (int i = 0; i < list_inapp.Count; i++) + { + var data = table_shop.Ins.Get_Data(list_inapp[i]); + Set_ShopReward(data); + inappmsg += data.Get_BuyItemMsg() + "\n"; + } + if (list_inapp.Count > 0) + { + LobbyUI.Ins.m_ToastUI.Set(inappmsg); + list_inapp.Clear(); + } + } } public bool isLoad() { return m_SaveData != null; } diff --git a/Assets/Scripts/UI/ShopCard.cs b/Assets/Scripts/UI/ShopCard.cs index 4525159..195a2db 100644 --- a/Assets/Scripts/UI/ShopCard.cs +++ b/Assets/Scripts/UI/ShopCard.cs @@ -221,56 +221,5 @@ public class ShopCard : MonoBehaviour } } - 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}개를 획득했습니다."; - } - - if (m_Data.b_AdRemove) - { - if (!string.IsNullOrEmpty(msg)) msg += "\n"; - msg += $"광고 제거권을 획득했습니다."; - } - - //if (m_Data.n_BonusGameRefill > 0) - //{ - // if (!string.IsNullOrEmpty(msg)) msg += "\n"; - // msg += $"보너스 게임 리필 횟수가 {m_Data.n_BonusGameRefill} 추가 되었습니다."; - //} - - if (m_Data.b_InfinityMiniGame) - { - if (!string.IsNullOrEmpty(msg)) msg += "\n"; - msg += $"미니 게임 무제한 입장을 획득했습니다.\n"; - msg += $"미니 게임 피버 지속시간이 2배 증가 했습니다."; - } - - if (m_Data.b_LuckyGameCharge) - { - if (!string.IsNullOrEmpty(msg)) msg += "\n"; - msg += $"뽑기 비용이 50% 감소 했습니다.\n"; - msg += $"뽑기 확률이 대폭 증가 했습니다."; - } - - if (string.IsNullOrEmpty(msg)) msg = "보상이 없습니다.\n보상을 설정해 주세요!"; - return msg; - } - + string Get_BuyItemMsg() { return m_Data.Get_BuyItemMsg(); } } \ No newline at end of file