protected void psstReqBuyMobileObjectPropertyUserCmd(ByteBuffer msg)
        {
            stReqBuyMobileObjectPropertyUserCmd cmd = new stReqBuyMobileObjectPropertyUserCmd();
            cmd.derialize(msg);

           //给与购买成功提示
        }
Esempio n. 2
0
        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);
            }
        }