summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-04-27 15:01:05 +0800
committerchai <chaifix@163.com>2022-04-27 15:01:05 +0800
commit072f02678d2c5d0d79f49e923b111c4a28da3f69 (patch)
tree8c931ed5248d4b00bcfc567678224f3661ad22a4
parente7e9050e7b288586abc173d2311e77cd9f9cebf9 (diff)
*fix bug
-rw-r--r--SurvivalTest/Assets/Scripts/Managers/PlayerManager_Weapons.cs4
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs8
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs7
3 files changed, 11 insertions, 8 deletions
diff --git a/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Weapons.cs b/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Weapons.cs
index d6d522a..e337c1f 100644
--- a/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Weapons.cs
+++ b/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Weapons.cs
@@ -73,8 +73,7 @@ public partial class PlayerManager : Singleton<PlayerManager>
isFire = true;
RunFireCoroutine(true);
}
-
- if (!autoFire && !Input.GetButton("Fire1") && (axis == 0 && m_LastAxisValue != 0))
+ else if(!autoFire && !Input.GetButton("Fire1") && (axis == 0 && m_LastAxisValue != 0))
{
if (TinyCountDown.Instance.Get("ReleaseFire") > 0)
{
@@ -84,6 +83,7 @@ public partial class PlayerManager : Singleton<PlayerManager>
}
else
{
+ autoFire = false;
TinyCountDown.Instance.Set("ReleaseFire", autoFireDuration);
isFire = false;
RunFireCoroutine(false);
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs b/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
index d2c6d4d..93ff6f1 100644
--- a/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
@@ -24,9 +24,11 @@ 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();
+ //int n = Random.Range(1, 20);
+ //Text_Count.gameObject.SetActive(n > 1);
+ //Text_Count.text = n.ToString();
+
+ Text_Count.gameObject.SetActive(false);
}
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs b/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
index 9a79cbc..11a18be 100644
--- a/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelWeaponBar/UIWeaponWidget.cs
@@ -26,10 +26,11 @@ public class UIWeaponWidget : UIGridPropBase
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();
+ //int n = Random.Range(1, 20);
+ //Text_Count.gameObject.SetActive(n > 1);
+ //Text_Count.text = n.ToString();
+ Text_Count.gameObject.SetActive(false);
}
private void Update()