예제 #1
0
        protected void UpdateView(UWarGoodsStoreItem _nParam)
        {
            if (_nParam == null || _nParam.SchemeGoodsInfo == null)
            {
                return;
            }

            UWarGoodsStoreView.GetWarGoodsIcon(_nParam.SchemeGoodsInfo.GoodsIconID, GoodsIcon);
            GoodsCost.text = _nParam.GoodsCost.ToString();
            GoodsName.text = _nParam.SchemeGoodsInfo.GoodsName;

            string des = _nParam.SchemeGoodsInfo.GoodsDes;

            UBBProperty.GetInstance().getRatio(des);
            U3D_Render.Common.UBB.toHtml(ref des, UBB_FORMAT_TYPE.UGUI);
            GoodsDetailInfo.text = des;
            SetBuyBtnEnable(_nParam.GoodsCanBuy);

            if (DataCenter.LogicDataCenter.warMobaGoodsDataManager.EnableGoodsFilter)
            {
                if (_nParam.IsFiltered)
                {
                    BuyBtn.gameObject.SetActive(false);
                }
                else
                {
                    BuyBtn.gameObject.SetActive(true);
                }
            }
            else
            {
                BuyBtn.gameObject.SetActive(true);
            }
        }
예제 #2
0
        protected virtual void NonAlwaysChangeData(UWarGoodsStoreItem item)
        {
            UWarGoodsStoreView.GetWarGoodsIcon(item.SchemeGoodsInfo != null ? item.SchemeGoodsInfo.GoodsIconID:0, GoodsIcon);



            if (IsTooltipInit() && item.SchemeGoodsInfo != null)
            {
                GoodsTooltips.SetImage(GoodsTooltip_IconParamName, UWarGoodsStoreView.GetWarGoodsIcon(item.SchemeGoodsInfo.GoodsIconID));
                GoodsTooltips.SetText(GoodsTooltip_NameParamName, item.SchemeGoodsInfo.GoodsName);
                string GoodsDes = item.SchemeGoodsInfo.GoodsDes;
                UBBProperty.GetInstance().getRatio(GoodsDes);
                U3D_Render.Common.UBB.toHtml(ref GoodsDes, UBB_FORMAT_TYPE.UGUI);
                GoodsTooltips.SetText(GoodsTooltip_InfoParamName, GoodsDes);

                string GoodsLocIns = item.SchemeGoodsInfo.GoodsLocationInstructions;
                U3D_Render.Common.UBB.toHtml(ref GoodsLocIns, UBB_FORMAT_TYPE.UGUI);
                GoodsTooltips.SetText(GoodsTooltip_LocInstructionsParamName, GoodsLocIns);
            }
            else
            {
                GoodsTooltips.SetImage(GoodsTooltip_IconParamName, null);
                GoodsTooltips.SetText(GoodsTooltip_NameParamName, "");
                GoodsTooltips.SetText(GoodsTooltip_InfoParamName, "");
                GoodsTooltips.SetText(GoodsTooltip_LocInstructionsParamName, "");
            }
        }