Made health bar actually do health stuff

This commit is contained in:
Pasha Bibko
2026-01-29 10:22:06 +00:00
parent 2e75a1323d
commit 96a75af6a1

View File

@@ -6,10 +6,11 @@ namespace InterfaceOff.WorldScene
{ {
public Transform HealthBarObject; public Transform HealthBarObject;
public WindowSpawner Spawner; public WindowSpawner Spawner;
public LifeThingTrackerThing Thing;
private void Update() private void Update()
{ {
float scale = (20 - Spawner.SpawnedWindowCount) * 5f; float scale = ((20 - Thing.HitsTaken) - Spawner.SpawnedWindowCount) * 5f;
scale = Mathf.Clamp(scale, 0f, Mathf.Infinity); scale = Mathf.Clamp(scale, 0f, Mathf.Infinity);
if (!Spawner.AutoSpawn) if (!Spawner.AutoSpawn)