protected void UpdatePackPrice() { XmlMarketCfg marketCfg = Ctx.m_instance.m_xmlCfgMgr.getXmlCfg <XmlMarketCfg>(XmlCfgID.eXmlMarketCfg); for (int i = 0; i < (int)ShopTxtPriceNum.eTxtTotal; i++) { XmlItemMarket itemMarket = marketCfg.getXmlItem(i + 1) as XmlItemMarket; m_txtPrice[i].text = string.Format("{0}", itemMarket.m_price); } }
protected void onBtnClkBuy(IDispatchObject dispObj) { GameObject _go = EventSystem.current.currentSelectedGameObject; if (0 == BuyIndex) { return; } XmlMarketCfg marketCfg = Ctx.m_instance.m_xmlCfgMgr.getXmlCfg <XmlMarketCfg>(XmlCfgID.eXmlMarketCfg); XmlItemMarket itemMarket = marketCfg.getXmlItem(BuyIndex) as XmlItemMarket; if (Ctx.m_instance.m_dataPlayer.m_dataMain.m_gold < itemMarket.m_price) { UtilApi.SetActive(m_NoGoldTip.gameObject, true); } else { stReqBuyMobileObjectPropertyUserCmd cmd = new stReqBuyMobileObjectPropertyUserCmd(); cmd.index = BuyIndex; UtilMsg.sendMsg(cmd); } }