예제 #1
0
    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();
        }
    }
예제 #2
0
    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();
        }
    }
예제 #3
0
    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();
        }
    }