using UnityEngine;

public class EnemyHealth : MonoBehaviour
{
    public int maxHP = 100;
    private int curHP;

    void Start()
    {
        curHP = maxHP;
    }
    public void TakeDamage(int damageAmount)
    {
        curHP -= damageAmount;

        if (curHP <= 0)
        {
            Die();
        }
    }

    void Die()
    {
        Destroy(gameObject);
    }
}
