summaryrefslogtreecommitdiff
path: root/SurvivalTest/Assets/Scripts/UI/Panel
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-10-02 09:46:56 +0800
committerchai <chaifix@163.com>2022-10-02 09:46:56 +0800
commita1ad193ee5cd22653d54f237935a9d34b8c146d1 (patch)
tree0fdd33a2ee1534e57fd56a1145031b9fad57e4ea /SurvivalTest/Assets/Scripts/UI/Panel
parent88a6b32e792910e11451da18eb5fb8c103235842 (diff)
+ survival
Diffstat (limited to 'SurvivalTest/Assets/Scripts/UI/Panel')
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs11
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs1
2 files changed, 8 insertions, 4 deletions
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs b/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
index 93ff6f1..0019c5c 100644
--- a/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
@@ -1,3 +1,4 @@
+//#define TEST
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -24,11 +25,13 @@ public class UIItemWidget : UIGridPropBase
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();
-
+#if TEST
+int n = Random.Range(1, 20);
+Text_Count.gameObject.SetActive(n > 1);
+Text_Count.text = n.ToString();
+#else
Text_Count.gameObject.SetActive(false);
+#endif
}
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs b/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
index d2740e6..b7e905d 100644
--- a/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
@@ -1,3 +1,4 @@
+#define TEST
using System.Collections;
using System.Collections.Generic;
using UnityEngine;