【内购】安卓商品
parent
a8c0053a69
commit
a2d1b18698
|
@ -13,7 +13,6 @@ namespace Gameplay.Manager
|
|||
public class ShopManager : Singlenton<ShopManager>, IInitable
|
||||
{
|
||||
private Dictionary<PropType, int> _unusedPropCount;
|
||||
public string Platform = "ios";
|
||||
public bool IsDebug;
|
||||
|
||||
private Dictionary<string, int> _consumableGoods;
|
||||
|
@ -40,21 +39,28 @@ namespace Gameplay.Manager
|
|||
InitProducts();
|
||||
//_sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.IAP) as IBuyServices;
|
||||
IAPManager.Instance.SetClientVerify(true);
|
||||
IAPManager.Instance.AddGoods(_consumableGoods.Keys.ToList(), _nonConsumableGoods.Keys.ToList(), OnRestorePurchase);
|
||||
IAPManager.Instance.AddGoods(_consumableGoods.Keys.ToList(), _nonConsumableGoods.Keys.ToList(),
|
||||
OnRestorePurchase);
|
||||
_init = true;
|
||||
}
|
||||
|
||||
private void InitProducts()
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
Platform = "android";
|
||||
#endif
|
||||
_consumableGoods = new Dictionary<string, int>()
|
||||
{
|
||||
{ Platform + "_CoinBox_100", 100 }, { Platform + "_CoinBox_600", 600 },
|
||||
{ Platform + "_CoinBox_1600", 1600 }
|
||||
{ "android_coinbox_100", 100 }, { "android_coinbox_600", 600 },
|
||||
{ "android_coinbox_1600", 1600 }
|
||||
};
|
||||
_nonConsumableGoods = new Dictionary<string, int>();
|
||||
#else
|
||||
_consumableGoods = new Dictionary<string, int>()
|
||||
{
|
||||
{ "ios_CoinBox_100", 100 }, { "ios_CoinBox_600", 600 },
|
||||
{ "ios_CoinBox_1600", 1600 }
|
||||
};
|
||||
_nonConsumableGoods = new Dictionary<string, int>();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void BuyGoods(string goodsID)
|
||||
|
|
Loading…
Reference in New Issue