Exemplo n.º 1
0
 public void Purchase1000Coins()
 {
     if (!isInProgress)
     {
         StaticInterop.FirePurchaseCoins("coins1000");
     }
 }
Exemplo n.º 2
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;
    }