コード例 #1
0
        internal virtual bool Init(UGoodsDispositionView _view)
        {
            m_MainView = _view;

            InitSubView();

            return(true);
        }
コード例 #2
0
 protected void SetGoods(UGD_GoodsDispositionItem _itemData)
 {
     for (int i = 0; i < _itemData.GoodsList.Length; ++i)
     {
         if (i < 6)
         {
             EerlyGoodsImgList[i].sprite = UGoodsDispositionView.GetGoodsIconByGoodsID(_itemData.GoodsList[i]);
         }
         else
         {
             CoreGoodsImgList[i - 6].sprite = UGoodsDispositionView.GetGoodsIconByGoodsID(_itemData.GoodsList[i]);
         }
     }
 }
コード例 #3
0
        protected virtual void NonAlwaysChangeData(SSchemeMobaGoods item)
        {
            UGoodsDispositionView.GetGoodsIcon(item != null ? item.GoodsIconID : 0, GoodsIcon);



            if (IsTooltipInit() && item != null)
            {
                GoodsTooltips.SetImage(GoodsTooltip_IconParamName, UGoodsDispositionView.GetGoodsIcon(item.GoodsIconID));
                GoodsTooltips.SetText(GoodsTooltip_NameParamName, item.GoodsName);
                string GoodsDes = item.GoodsDes;
                UBBProperty.GetInstance().getRatio(GoodsDes);
                U3D_Render.Common.UBB.toHtml(ref GoodsDes, UBB_FORMAT_TYPE.UGUI);
                GoodsTooltips.SetText(GoodsTooltip_InfoParamName, GoodsDes);
            }
            else
            {
                GoodsTooltips.SetImage(GoodsTooltip_IconParamName, null);
                GoodsTooltips.SetText(GoodsTooltip_NameParamName, "");
                GoodsTooltips.SetText(GoodsTooltip_InfoParamName, "");
            }
        }
コード例 #4
0
        public virtual void SetData(int _newMobaGoodsID)
        {
            if (_newMobaGoodsID == m_nMobaGoodsID)
            {
                return;
            }

            m_nMobaGoodsID    = _newMobaGoodsID;
            GoodsImage.sprite = UGoodsDispositionView.GetGoodsIconByGoodsID(m_nMobaGoodsID);

            if (ShowTooltip)
            {
                if (GoodsTooltips == null)
                {
                    GoodsTooltips = gameObject.AddComponent <UTooltipTrigger>(ETooltipStyle.ETS_WarGoods);
                }

                SSchemeMobaGoods goodsSScheme;
                GoodsSchemesDataManager.Instance.GetMobaGoods_Out(_newMobaGoodsID, out goodsSScheme);
                if (goodsSScheme != null && _newMobaGoodsID != 0 && GoodsTooltips != null)
                {
                    GoodsTooltips.enabled = true;
                    GoodsTooltips.SetImage(GoodsTooltip_IconParamName, UGoodsDispositionView.GetGoodsIcon(goodsSScheme.GoodsIconID));
                    GoodsTooltips.SetText(GoodsTooltip_NameParamName, goodsSScheme.GoodsName);
                    string GoodsDes = goodsSScheme.GoodsDes;
                    UBBProperty.GetInstance().getRatio(GoodsDes);
                    U3D_Render.Common.UBB.toHtml(ref GoodsDes, UBB_FORMAT_TYPE.UGUI);
                    GoodsTooltips.SetText(GoodsTooltip_InfoParamName, GoodsDes);
                    GoodsTooltips.SetText(GoodsTooltip_CostParamName, goodsSScheme.GoodsCost.ToString());
                }
                else
                {
                    GoodsTooltips.enabled = false;
                }
            }
        }
コード例 #5
0
 public void SetData(UGD_HeroHeadPortraitItem item)
 {
     HeadPortraitImage.sprite = UGoodsDispositionView.GetHeroHeadPortrait(item.HeroHeadPortraitID);
     HeroNameText.text        = item.HeroName;
 }