Made health bar actually do health stuff
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user