Example #1
0
        protected void onBtnClkShop(IDispatchObject dispObj)
        {
            Ctx.m_instance.m_uiMgr.loadAndShow(UIFormID.eUIShop);
            IUIShop shop = Ctx.m_instance.m_uiMgr.getForm(UIFormID.eUIShop) as IUIShop;

            UtilApi.setScale(shop.GUIWin().m_uiRoot.transform, new Vector3(1.0f, 1.0f, 1.0f));
            // 发送消息
            stReqMarketObjectInfoPropertyUserCmd cmd = new stReqMarketObjectInfoPropertyUserCmd();

            UtilMsg.sendMsg(cmd);
        }
Example #2
0
        public List <DataItemShop> m_objList = new List <DataItemShop>();             // 道具列表

        // 更新商城内容
        public void updateShop(List <ushort> list)
        {
            m_objList.Clear();
            XmlMarketCfg marketCfg = Ctx.m_instance.m_xmlCfgMgr.getXmlCfg <XmlMarketCfg>(XmlCfgID.eXmlMarketCfg);
            DataItemShop dataItemShop;

            foreach (ushort id in list)
            {
                dataItemShop = new DataItemShop();
                m_objList.Add(dataItemShop);
                dataItemShop.m_xmlItemMarket = marketCfg.getXmlItem(id) as XmlItemMarket;
            }

            IUIShop uiShop = Ctx.m_instance.m_uiMgr.getForm(UIFormID.eUIShop) as IUIShop;

            if (uiShop != null)
            {
                //uiShop.updateShopData();
            }
        }
Example #3
0
        // 如果要调试,可以重载,方便调试
        //public override void handleMsg(ByteBuffer bu, byte byCmd, byte byParam)
        //{
        //
        //}

        protected void psstMainUserDataUserCmd(ByteBuffer msg)
        {
            stMainUserDataUserCmd cmd = new stMainUserDataUserCmd();

            cmd.derialize(msg);
            Ctx.m_instance.m_dataPlayer.m_dataMain = cmd.data;

            if (!Ctx.m_instance.m_uiMgr.hasForm(UIFormID.eUIShop))
            {
                Ctx.m_instance.m_uiMgr.loadForm(UIFormID.eUIShop);
            }

            IUIShop shop = Ctx.m_instance.m_uiMgr.getForm(UIFormID.eUIShop) as IUIShop;

            if (shop != null)
            {
                shop.UpdateGoldNum(cmd.data.m_gold);
            }

            Ctx.m_instance.m_logSys.log(string.Format("接收到主数据,money = {0}", cmd.data.m_gold));
        }