public void OnClick() { if(transform.root.FindChild("Shop").GetComponent<Shop>().mCategory == Shop.GOLD){ transform.root.FindChild("Shop").GetComponent<Shop>().RequestIAP(mGoldInfo.productCode, mGoldInfo.productName); } else{ if(UserMgr.UserInfo.gold < mItemInfo.price){ UtilMgr.NotEnoughGold(); return; } mGoldEvent = new PurchaseGoldEvent(ReceivedPurchase); NetMgr.PurchaseGold(mItemInfo.productCode, mGoldEvent); } }
public void OnClick() { if (transform.root.FindChild("Shop").GetComponent <Shop>().mCategory == Shop.GOLD) { transform.root.FindChild("Shop").GetComponent <Shop>().RequestIAP(mGoldInfo.productCode, mGoldInfo.productName); } else { if (UserMgr.UserInfo.gold < mItemInfo.price) { UtilMgr.NotEnoughGold(); return; } mGoldEvent = new PurchaseGoldEvent(ReceivedPurchase); NetMgr.PurchaseGold(mItemInfo.productCode, mGoldEvent); } }