diff --git a/Assets/Scripts/SingletonManagers/Managers/DBManager.cs b/Assets/Scripts/SingletonManagers/Managers/DBManager.cs index 42743c4..def01b7 100644 --- a/Assets/Scripts/SingletonManagers/Managers/DBManager.cs +++ b/Assets/Scripts/SingletonManagers/Managers/DBManager.cs @@ -55,7 +55,7 @@ namespace CodeJay this.Sound_Toggle = false; this.SFX_Toggle = false; this.IsRemoveADS = false; - this.GameSpeed = 0.5f; + this.GameSpeed = 1.5f; this.ProductAdWatchedNumber = Constants.ADS_REWARD_COUNT; this.FreeHeartCount = Constants.FREE_HEART_DAY; FreeKeyCount = Constants.FREE_HEART_DAY; diff --git a/Assets/Scripts/SingletonManagers/Managers/IAPManager.cs b/Assets/Scripts/SingletonManagers/Managers/IAPManager.cs index 8a6ae6f..7ffec5c 100644 --- a/Assets/Scripts/SingletonManagers/Managers/IAPManager.cs +++ b/Assets/Scripts/SingletonManagers/Managers/IAPManager.cs @@ -51,6 +51,9 @@ public class IAPManager : MonoBehaviour, IDetailedStoreListener private void Init_IAP() { +#if UNITY_EDITOR + Init_Google(); +#else Debug.Log("StoreEnvironment.GetStoreType() " + StoreEnvironment.GetStoreType()); if (StoreEnvironment.GetStoreType() == StoreType.ONESTORE) { @@ -61,27 +64,33 @@ public class IAPManager : MonoBehaviour, IDetailedStoreListener m_PurchaseClientImpl.QueryPurchases(OneStore.Purchasing.ProductType.INAPP); // 미지급된 상품이 있는 지 체크 } else - { - ConfigurationBuilder builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance()); - - /* 구글 플레이 상품들 추가 */ - //builder.AddProduct("com.fgb.adsremove", ProductType.Consumable); - builder.AddProduct("com.fgb.cash500", UnityEngine.Purchasing.ProductType.Consumable); - builder.AddProduct("com.fgb.cash2000", UnityEngine.Purchasing.ProductType.Consumable); - builder.AddProduct("com.fgb.cash7500", UnityEngine.Purchasing.ProductType.Consumable); - builder.AddProduct("com.fgb.heart20", UnityEngine.Purchasing.ProductType.Consumable); - builder.AddProduct("com.fgb.heart150", UnityEngine.Purchasing.ProductType.Consumable); - builder.AddProduct("com.fgb.heart500", UnityEngine.Purchasing.ProductType.Consumable); - - UnityPurchasing.Initialize(this, builder); - } + Init_Google(); +#endif isInitialize = true; } + void Init_Google() + { + ConfigurationBuilder builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance()); + + /* 구글 플레이 상품들 추가 */ + //builder.AddProduct("com.fgb.adsremove", ProductType.Consumable); + builder.AddProduct("com.fgb.cash500", UnityEngine.Purchasing.ProductType.Consumable); + builder.AddProduct("com.fgb.cash2000", UnityEngine.Purchasing.ProductType.Consumable); + builder.AddProduct("com.fgb.cash7500", UnityEngine.Purchasing.ProductType.Consumable); + builder.AddProduct("com.fgb.heart20", UnityEngine.Purchasing.ProductType.Consumable); + builder.AddProduct("com.fgb.heart150", UnityEngine.Purchasing.ProductType.Consumable); + builder.AddProduct("com.fgb.heart500", UnityEngine.Purchasing.ProductType.Consumable); + + UnityPurchasing.Initialize(this, builder); + } /* 구매하는 함수 */ public void Purchase(string productId) { +#if UNITY_EDITOR + BuyItem(productId); +#else if (StoreEnvironment.GetStoreType() == StoreType.ONESTORE) { ProductDetail productDetail = m_OneStoreIapCallBack.Get_ProductDetail(productId); @@ -102,23 +111,26 @@ public class IAPManager : MonoBehaviour, IDetailedStoreListener } } else + BuyItem(productId); +#endif + } + void BuyItem(string productId) + { + if (storeController != null) { - if (storeController != null) - { - Product product = storeController.products.WithID(productId); //상품 정의 + Product product = storeController.products.WithID(productId); //상품 정의 - if (product != null && product.availableToPurchase) //상품이 존재하면서 구매 가능하면 - { - storeController.InitiatePurchase(product); //구매가 가능하면 진행 - } - else //상품이 존재하지 않거나 구매 불가능하면 - { - Debug.Log("상품이 없거나 현재 구매가 불가능합니다"); - } + if (product != null && product.availableToPurchase) //상품이 존재하면서 구매 가능하면 + { + storeController.InitiatePurchase(product); //구매가 가능하면 진행 + } + else //상품이 존재하지 않거나 구매 불가능하면 + { + Debug.Log("상품이 없거나 현재 구매가 불가능합니다"); } - else - Debug.Log("인앱 초기화가 되지 않았습니다."); } + else + Debug.Log("인앱 초기화가 되지 않았습니다."); } /* 초기화 성공 시 실행되는 함수 */ diff --git a/Assets/Scripts/UI/GamePanel/GamePanel.cs b/Assets/Scripts/UI/GamePanel/GamePanel.cs index 95f47dc..f5a1137 100644 --- a/Assets/Scripts/UI/GamePanel/GamePanel.cs +++ b/Assets/Scripts/UI/GamePanel/GamePanel.cs @@ -114,7 +114,7 @@ public partial class GamePanel : MonoBehaviour for (EGameWorkFlowType i = 0; i < EGameWorkFlowType.Max; i++) _dicCoroutineStates.Add(i, EGameStateType.None); - GameSpeed = (1.8f * GameManager.DB.GameSpeed) + 0.2f; + GameSpeed = GameManager.DB.GameSpeed; } private void Start()