Example #1
0
    private static void OnPurchaseConfirmed(string product)
    {
        switch (product)
        {
        case "coins100":
            PlayerSettings.AddCoins(100);
            StaticInterop.ConfirmPurchase(product, transaction);
            GameLogic.GetGameLogic().HideShopMenu();
            GameLogic.GetGameLogic().ShowPurchaseSuccessful();
            break;

        case "coins250":
            PlayerSettings.AddCoins(250);
            StaticInterop.ConfirmPurchase(product, transaction);
            GameLogic.GetGameLogic().HideShopMenu();
            GameLogic.GetGameLogic().ShowPurchaseSuccessful();
            break;

        case "coins1000":
            PlayerSettings.AddCoins(1000);
            StaticInterop.ConfirmPurchase(product, transaction);
            GameLogic.GetGameLogic().HideShopMenu();
            GameLogic.GetGameLogic().ShowPurchaseSuccessful();
            break;

        case "existing":
            StaticInterop.ConfirmPurchase(product, transaction);
            GameLogic.GetGameLogic().HideShopMenu();
            GameLogic.GetGameLogic().ShowPurchaseExisting();
            break;

        default:
            GameLogic.GetGameLogic().HideShopMenu();
            GameLogic.GetGameLogic().ShowPurchaseError();
            break;
        }
        transaction  = new Guid();
        isInProgress = false;
    }
Example #2
0
 // Collect the bonus. Add coins to the player.
 public override void CollectBonus()
 {
     PlayerSettings.AddCoins(coinsPerCollect);
 }