コード例 #1
0
        //-------------------------------------------------------------------------
        public ToolTip getToolTip(_eUiItemParent item_from)
        {
            ToolTip tool_tip = new ToolTip();

            switch (UnitType)
            {
            case "Consumables":
                ConsumToolTipHead consum_tooltip_head = new ConsumToolTipHead();
                consum_tooltip_head.ItemIco    = Icon;
                consum_tooltip_head.ItemName   = Name;
                consum_tooltip_head.ItemTypeId = ItemTypeId;
                tool_tip.ToolTipHead           = consum_tooltip_head;

                ConsumToolTipDetail              consum_tooltip_detail = new ConsumToolTipDetail();
                TbDataUnitConsumables            consumable            = EbDataMgr.Instance.getData <TbDataUnitConsumables>(Id);
                List <_ToolTipContentDetailInfo> list_consum_detail    = ToolTipHelper.Instant.getToolTipNormalContentDetailText(consumable.ListEffect);
                consum_tooltip_detail.list_detail = list_consum_detail;
                consum_tooltip_detail.MadeBy      = "";
                tool_tip.ToolTipDetail            = consum_tooltip_detail;
                break;
            }
            tool_tip.ToolTipEnd = _getToolTipEnd(item_from);

            return(tool_tip);
        }
コード例 #2
0
 //-------------------------------------------------------------------------
 public void create(Entity et_src, bool is_client, Dictionary <byte, string> map_unit_data)
 {
     EtSrc = et_src;
     TbDataUnitConsumables = EbDataMgr.Instance.getData <TbDataUnitConsumables>(Item.TbDataItem.Id);
     if (map_unit_data == null || map_unit_data.Count == 0)
     {
         if (EtSrc != null)
         {
             MadeBy = EtSrc.getComponentDef <DefActor>().mPropNickName.get();
         }
     }
 }