Exemple #1
0
    private void addOnWallet()
    {
        switch (itemType)
        {
        case ItemsType.coin: {
            WalletController.addCoin();

            break;
        }

        case ItemsType.whistle: {
            WalletController.addCoins(value);

            break;
        }

        case ItemsType.yellowCard: {
            WalletController.addYellowCard();

            break;
        }

        default: {
            WalletController.addItems(itemType, value);

            break;
        }
        }

        Destroy(this.gameObject);
    }
Exemple #2
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();
        }
    }
Exemple #3
0
 /// <summary>
 /// Start this instance.
 /// </summary>
 void Start()
 {
     init();
     WalletController.addCoins(1200000);
 }