Пример #1
0
    // 花金币加时
    public void BuyExtra()
    {
        if (GetComponent <GoldController> ().Gold >= 50)
        {
            GetComponent <GoldController>().Gold -= 50;
            AddGameTime(11);

            GA.Buy("ExtraTime", 1, 50);

            this.HideExtraTime();
            this.RandomNext();
        }
    }
Пример #2
0
 /// <summary>
 /// 增加游戏中货币,豆子
 /// </summary>
 /// <param name="num"></param>
 public void AddRoomCard(int num)
 {
     if (num > 0) //增加房卡
     {
         GA.Buy(GlobalData.mHostFkId, num, 1);
     }
     else if (num < 0)                          //消耗房卡
     {
         GA.Use(GlobalData.mHostFkId, -num, 1); // 友盟
         TDGAItem.OnPurchase(GlobalData.mHostFkId, -num, 1);
     }
     mPlayerData.roomCardNum += num;
     RefreshPlayerInfoData();
 }
Пример #3
0
    public void BuyLongerLine(int num)
    {
        int price = ItemConfig.GetItem(2003).price *num;

        if (Gold < price)         // gold not enough
        {
            return;
        }
        LongerLine += num;
        Gold       -= price;

        GA.Buy("LongerLine", num, price);

        TouchHandler.PlayClickAudio();          // 按钮点击音效
    }
Пример #4
0
    public void BuyBasket(int num)
    {
        int price = ItemConfig.GetItem(2001).price *num;

        if (Gold < price)         // gold not enough
        {
            return;
        }
        Basket += num;
        Gold   -= price;

        GA.Buy("Basket", num, price);

        TouchHandler.PlayClickAudio();          // 按钮点击音效
    }
Пример #5
0
 public void Buy(string item, int amount, double price)
 {
     GA.Buy(item, amount, price);
 }
Пример #6
0
 public static void Buy(string item, int amount, double price)
 {
             #if UNITY_IPHONE || UNITY_ANDROID
     GA.Buy(item, amount, price);
             #endif
 }
 /// <summary>
 /// 使用虚拟币购买道具
 /// </summary>
 /// <param name="propName">道具名称</param>
 /// <param name="amount">购买的道具数量</param>
 /// <param name="price">道具的价格</param>
 public void VirtualCoinBuy(string propName, int amount, double price)
 {
     GA.Buy(propName, amount, price);
 }
Пример #8
0
 public void Buy(string item, int number, float price)
 {
     GA.Buy(item, number, price);
 }