Implement enemy spawning and following waypoints
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user