Implement enemy spawning and following waypoints

This commit is contained in:
2024-08-12 14:21:11 +02:00
parent 5104b336ca
commit 3f715b2bbc
44 changed files with 1894 additions and 52 deletions

View File

@@ -7,6 +7,11 @@ using UnityEngine.EventSystems;
public class HealthComponent : MonoBehaviour
{
[SerializeField]
[Required]
[OnValueChanged("Setup")]
private Enemy enemy;
[ReadOnly]
[SerializeField]
private int health;
@@ -20,7 +25,7 @@ public class HealthComponent : MonoBehaviour
[Button]
public void Setup()
{
health = 100;
health = enemy.health;
isDead = false;
}