Added a health bar

This commit is contained in:
Pasha Bibko
2026-01-20 15:45:24 +00:00
parent db4ece3445
commit 7307a64e77
4 changed files with 63 additions and 16 deletions

View File

@@ -0,0 +1,15 @@
using UnityEngine;
namespace InterfaceOff.WorldScene
{
public class HealthBar : MonoBehaviour
{
public Transform HealthBarObject;
public WindowSpawner Spawner;
private void Update()
{
HealthBarObject.localScale = new Vector3(100f, (20 - Spawner.SpawnedWindowCount) * 5f, 100f);
}
}
}