Files
UnicornElimination/Assets/Scripts/LivingEntity.cs

24 lines
490 B
C#
Raw Normal View History

2026-05-04 00:19:01 +09:00
using UnityEngine;
public partial class LivingEntity : MonoBehaviour
{
public float health = 20.0f;
public void Damage(float damage, Collider2D cause)
{
health -= damage;
OnDamaged(damage, cause);
if (health <= 0.0f) OnDeath();
}
private void OnDamaged(float damage, Collider2D cause)
{
throw new System.NotImplementedException();
}
private void OnDeath()
{
throw new System.NotImplementedException();
}
}