diff options
Diffstat (limited to 'SurvivalTest/Assets/Scripts/UI')
3 files changed, 22 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; diff --git a/SurvivalTest/Assets/Scripts/UI/UIManager_Panels.cs b/SurvivalTest/Assets/Scripts/UI/UIManager_Panels.cs index bb48afd..79305fa 100644 --- a/SurvivalTest/Assets/Scripts/UI/UIManager_Panels.cs +++ b/SurvivalTest/Assets/Scripts/UI/UIManager_Panels.cs @@ -63,4 +63,18 @@ public partial class UIManager : Singleton<UIManager> return panel; } + public PanelBase GetPanel(PanelType type) + { + if(m_OpenedPanels.ContainsKey(type)) + { + return m_OpenedPanels[type]; + } + return null; + } + + public bool IsPanelOpen(PanelType type) + { + return m_OpenedPanels.ContainsKey(type); + } + }
\ No newline at end of file |