diff options
Diffstat (limited to 'SurvivalTest/Assets/Scripts')
7 files changed, 60 insertions, 5 deletions
diff --git a/SurvivalTest/Assets/Scripts/Animation.meta b/SurvivalTest/Assets/Scripts/Animation.meta new file mode 100644 index 0000000..7423224 --- /dev/null +++ b/SurvivalTest/Assets/Scripts/Animation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b27edb6c7c37b19428208b15b46c1ae1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs b/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs new file mode 100644 index 0000000..b00f24d --- /dev/null +++ b/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class TestSnapAngle : MonoBehaviour +{ + + public int m_Count = 16; + + [Range(0, 15)] + public int m_Angle; + + public void Update() + { + transform.rotation = Quaternion.Euler(0,m_Angle * 360f/ m_Count, 0); + } + +} diff --git a/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs.meta b/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs.meta new file mode 100644 index 0000000..feaafdd --- /dev/null +++ b/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7fdebeb74e63b3f468bf54657d6cdf03 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: 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 diff --git a/SurvivalTest/Assets/Scripts/Weapons/Weapon_GrenadeLauncher.cs b/SurvivalTest/Assets/Scripts/Weapons/Weapon_GrenadeLauncher.cs index 3a4457a..507d8a5 100644 --- a/SurvivalTest/Assets/Scripts/Weapons/Weapon_GrenadeLauncher.cs +++ b/SurvivalTest/Assets/Scripts/Weapons/Weapon_GrenadeLauncher.cs @@ -14,7 +14,7 @@ public class Weapon_GrenadeLauncher : WeaponBase public override AutoMode autoMode => AutoMode.Interval; - public override float interval => 0.5f; + public override float interval => 2f; private string prefabPath = "prefabs/grenade/grenade_v1"; |