Beispiel #1
0
 private void PayBackSuccess()
 {
     if (!PaymentManager.instance.isTestPay)
     {
         GA.Pay(CurChargeItem.price, GA.PaySource.GAME, CurChargeItem.GetAddNum());
     }
 }
Beispiel #2
0
    public ChargeItem GetNearestChargeItem(int payType, int payNum)
    {
        if (config.Count <= 0)
        {
            Init();
        }
        ChargeItem get = null;

        foreach (var item in config.Values)
        {
            if (item.GetAddType() == payType)
            {
                if (get == null || item.GetAddNum() > get.GetAddNum())
                {
                    get = item;
                }
                if (item.GetAddNum() >= payNum)
                {
                    get = item;
                    break;
                }
            }
        }
        return(get);
    }
Beispiel #3
0
    public void Init(ChargeItem item)
    {
        myItem = item;
        string spName = DataController.iconPathSkill + ItemManager.instance.GetItem((ItemID)item.GetAddType()).spriteName;

        icon.sprite = Resources.Load(spName, typeof(Sprite)) as Sprite;
        icon.SetNativeSize();
        txAddNum.text = "" + item.GetAddNum();
        txPrice.text  = item.price + "";
    }
Beispiel #4
0
 public void OnClickPay()
 {
     AudioManager.instance.Play();
     ShopUI.instance.DoItemPay(myItem.GetAddType(), myItem.GetAddNum());
 }