Fixed health bar glitches

This commit is contained in:
Pasha Bibko committed 2026-01-22 10:11:48 +00:00
1 parent fc629e45b6
commit 8a3aad807b
1 file changed
+9 -1
+9 -1
View File
@@ -9,7 +9,15 @@ namespace InterfaceOff.WorldScene
private void Update()
{
HealthBarObject.localScale = new Vector3(100f, (20 - Spawner.SpawnedWindowCount) * 5f, 100f);
float scale = (20 - Spawner.SpawnedWindowCount) * 5f;
scale = Mathf.Clamp(scale, 0f, Mathf.Infinity);
if (!Spawner.AutoSpawn)
{
scale = 0f;
}
HealthBarObject.localScale = new Vector3(100f, scale, 100f);
}
}
}