summaryrefslogtreecommitdiff
path: root/SurvivalTest/Assets/Scripts/UI/Panel
diff options
context:
space:
mode:
Diffstat (limited to 'SurvivalTest/Assets/Scripts/UI/Panel')
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs b/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
index 0f9d623..277acba 100644
--- a/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
@@ -12,6 +12,8 @@ public class UIItemWidget : UIGridPropBase
{
public Image Image_Icon;
+ public Text Text_Count;
+
public ItemBase item { get { return m_Item; } }
private ItemBase m_Item;
@@ -21,6 +23,11 @@ public class UIItemWidget : UIGridPropBase
m_Item = info.item;
Image_Icon.sprite = ResourceManager.Instance.Load<Sprite>(info.item.iconPath);
+
+ int n = Random.Range(1, 20);
+ Text_Count.gameObject.SetActive(n > 1);
+ Text_Count.text = n.ToString();
+
}
private void Update()