summaryrefslogtreecommitdiff
path: root/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-04-26 09:31:54 +0800
committerchai <chaifix@163.com>2022-04-26 09:31:54 +0800
commitcd612a7bfb75606718fe95feb33e5eb6cf4e09dc (patch)
tree3cf790b2dbc5bd96e62345460c3be14e182ab4b2 /SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
parent87d1aea440eb224c7b384e9e4bd6af2c55be8752 (diff)
*misc
Diffstat (limited to 'SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs')
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs b/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
index baac0d2..9a79cbc 100644
--- a/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
@@ -12,6 +12,7 @@ public class UIWeaponWidget : UIGridPropBase
{
public Image Image_Icon;
public Image Image_CD;
+ public Text Text_Count;
public WeaponBase weapon { get { return m_Weapon; } }
private WeaponBase m_Weapon;
@@ -24,6 +25,11 @@ public class UIWeaponWidget : UIGridPropBase
Image_Icon.sprite = ResourceManager.Instance.Load<Sprite>(info.weapon.iconPath);
Image_CD.gameObject.SetActive(weapon.autoMode == WeaponBase.AutoMode.Interval);
+
+ int n = Random.Range(1, 20);
+ Text_Count.gameObject.SetActive(n > 1);
+ Text_Count.text = n.ToString();
+
}
private void Update()