void android_purchaseSucceededEvent(GooglePurchase purchase) { if (purchase.purchaseState == GooglePurchase.GooglePurchaseState.Purchased) { if (purchase.productId == BillingItemsIds.coin_01) { WalletController.addCoins(100f); } else if (purchase.productId == BillingItemsIds.coin_02) { WalletController.addCoins(1000f); } else if (purchase.productId == BillingItemsIds.coin_03) { WalletController.addCoins(10000f); } else if (purchase.productId == BillingItemsIds.coin_04) { WalletController.addCoins(100000f); } BillingManager.consumeItem(purchase.productId); StoreInterface.updateCoin(); } }
public static void buyItemLevelUp(Items _item, float _moneyItem) { if (_moneyItem <= WalletController.getValue(ItemsType.coin)) { WalletController.removeItems(ItemsType.coin, _moneyItem); DictionaryItems.LevelUp(_item); DictionaryItems.playInitItems(); StoreInterface.updateCoin(); } else { WarningManager.noMoney(); } }
public void createScene(string name) { if (name == "Shop") { this.createShop(); StoreInterface.updateCoin(); } else if (name == "Opcoes") { this.createConfiguration(); } else if (name == "Menu") { this.createMenu(); } else if (name == "cred") { this.createCredits(); } else if (name == "Level-UP") { this.createLevelUp(); } else if (name == "Utilits") { this.createUtilits(); } else if (name == "Accessories") { this.createAccessories(); } else if (name == "Coins") { this.createBuyCoins(); } }