Fixed small issues found in playtesting

This commit is contained in:
Pasha Bibko
2026-01-29 13:54:10 +00:00
parent 13af242e69
commit 69fd62b3ac
8 changed files with 39 additions and 14 deletions

View File

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