diff options
author | chai <chaifix@163.com> | 2022-04-25 10:19:09 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-04-25 10:19:09 +0800 |
commit | 7eb9351d905ddf6316fd6b177fff967fbac6fc94 (patch) | |
tree | 4ef3844fba1a2ff719178a96b37780b29faacd7c /SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs | |
parent | 8131033510c711248de1904649cfa1dbe4bbe69f (diff) |
* rename decoration to item
Diffstat (limited to 'SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs')
-rw-r--r-- | SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs b/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs new file mode 100644 index 0000000..0f9d623 --- /dev/null +++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs @@ -0,0 +1,30 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public struct UIItemWidgetParam +{ + public ItemBase item; +} + +public class UIItemWidget : UIGridPropBase +{ + public Image Image_Icon; + + public ItemBase item { get { return m_Item; } } + private ItemBase m_Item; + + public override void Set(object param) + { + UIItemWidgetParam info = (UIItemWidgetParam)param; + m_Item = info.item; + + Image_Icon.sprite = ResourceManager.Instance.Load<Sprite>(info.item.iconPath); + } + + private void Update() + { + } + +}
\ No newline at end of file |