|
@@ -49,6 +49,7 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
UIManager.Instance.DormancyGComponent(buBetterList[i]);
|
|
|
}
|
|
|
+
|
|
|
buBetterList.Clear();
|
|
|
base.DormancyObj();
|
|
|
}
|
|
@@ -104,11 +105,17 @@ namespace Fort23.Mono
|
|
|
|
|
|
hp.rectTransform.sizeDelta = new Vector2(v * size, hp.rectTransform.sizeDelta.y);
|
|
|
|
|
|
-
|
|
|
- float v2 = (combatHeroEntity.CurrCombatHeroInfo.Shield.Value * 1f) /
|
|
|
- combatHeroEntity.MaxCombatHeroInfo.Shield.Value;
|
|
|
- v2 = Mathf.Clamp(v2, 0, 1);
|
|
|
- shield.rectTransform.sizeDelta = new Vector2(v2 * shieldSize, shield.rectTransform.sizeDelta.y);
|
|
|
+ if (combatHeroEntity.MaxCombatHeroInfo.Shield.Value > 0)
|
|
|
+ {
|
|
|
+ float v2 = (combatHeroEntity.CurrCombatHeroInfo.Shield.Value * 1f) /
|
|
|
+ combatHeroEntity.MaxCombatHeroInfo.Shield.Value;
|
|
|
+ v2 = Mathf.Clamp(v2, 0, 1);
|
|
|
+ shield.rectTransform.sizeDelta = new Vector2(v2 * shieldSize, shield.rectTransform.sizeDelta.y);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ shield.rectTransform.sizeDelta = new Vector2(0, shield.rectTransform.sizeDelta.y);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void ClearHeroHp(IEventData iEventData)
|
|
@@ -134,6 +141,7 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
UIManager.Instance.DormancyGComponent(buBetterList[i]);
|
|
|
}
|
|
|
+
|
|
|
buBetterList.Clear();
|
|
|
if (string.IsNullOrEmpty(poolObjName))
|
|
|
{
|
|
@@ -181,16 +189,16 @@ namespace Fort23.Mono
|
|
|
|
|
|
private void Update()
|
|
|
{
|
|
|
-
|
|
|
-
|
|
|
for (int i = 0; i < buBetterList.Count; i++)
|
|
|
{
|
|
|
buBetterList[i].Update();
|
|
|
}
|
|
|
+
|
|
|
if (!isFollowTarget)
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
Vector3 worldPos = hpTransform.position;
|
|
|
Vector3 p = UIManager.Instance.CurrCustomCameraStack.camera.WorldToScreenPoint(worldPos);
|
|
|
Vector3 p2 = UIManager.Instance.UICamera.ScreenToWorldPoint(p);
|