movement and dialogue system

This commit is contained in:
Sylvia 2026-07-25 02:23:50 -07:00
parent 977e666577
commit 1590b5faa6
123 changed files with 62825 additions and 355 deletions

View file

@ -0,0 +1,32 @@
using UnityEngine;
public class CombatEntity : Entity
{
[Header("Health")]
public float maxHealth;
public float health;
public bool invulnerable;
public void TakeDamage(float damage)
{
if (!invulnerable)
{
health -= damage;
if (health <= 0)
{
OnDeath();
}
}
}
protected virtual void OnDeath()
{
}
public void Heal(float healing)
{
health += healing;
health = Mathf.Clamp(health, 0, maxHealth);
}
}