using System.Collections; using System.Collections.Generic; using UnityEngine; public abstract class EnemyNPCContoller : NPCConroller, IHealthSystem { [Header("NPC Attributes: ")] [SerializeField] protected float health; [SerializeField] protected float maxHealth; [SerializeField] protected GameObject target; public GameObject Target => target; public float GetHealth() => health; public void Heal(float ammount) => health += ammount; public bool IsDead() => health <= 0f; public void TakeDamage(float ammount) => maxHealth -= ammount; protected override void Awake() { base.Awake(); } // Start is called before the first frame update protected override void Start() { base.Start(); health = maxHealth; } // Update is called once per frame protected override void Update() { base.Update(); } }