Files
No-Time-To-Rest/Assets/Scripts/Enemy.cs
T

11 lines
200 B
C#

using UnityEngine;
public class Enemy : MonoBehaviour
{
public float hp = 100f;
public void DealDamage(float damage) {
hp -= damage;
if (hp <= 0) Destroy(gameObject);
}
}