private void PayBackSuccess() { if (!PaymentManager.instance.isTestPay) { GA.Pay(CurChargeItem.price, GA.PaySource.GAME, CurChargeItem.GetAddNum()); } }
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); }
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 + ""; }
public void OnClickPay() { AudioManager.instance.Play(); ShopUI.instance.DoItemPay(myItem.GetAddType(), myItem.GetAddNum()); }