초기 게임속도 1 -> 1.5, 유니티 에디터 결제 등
This commit is contained in:
parent
e07d40d684
commit
e08d64fe68
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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("인앱 초기화가 되지 않았습니다.");
|
||||
}
|
||||
|
||||
/* 초기화 성공 시 실행되는 함수 */
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue