Files
No-Time-To-Rest/Assets/Scripts/Enemies/Enemy.cs
T
KOSMOGOR 2869bfdb33 add: Level and Game controllers base
update: scripts are now in folders
2025-03-17 15:28:10 +03:00

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);
}
}