From a1ad193ee5cd22653d54f237935a9d34b8c146d1 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 2 Oct 2022 09:46:56 +0800 Subject: + survival --- .../Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs | 11 +++++++---- .../Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'SurvivalTest/Assets/Scripts/UI/Panel') 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(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; -- cgit v1.1-26-g67d0