start work on implementing gameplay

This commit is contained in:
Sylvia 2026-06-25 15:15:16 -07:00
parent 94f5a5e209
commit 274af1e5a1
42 changed files with 3054 additions and 371 deletions

35
Assets/Scripts/Entity.cs Normal file
View file

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using UnityEngine;
public class Entity : MonoBehaviour
{
[Header("Health")]
public int health; //using int instead of float because it's a simpler game lol
public int maxHealth;
[Header("State")]
public bool isStalled;
[Header("Abilities")]
public List<Ability> abilities = new();
public void TakeDamage(int damage)
{
health -= damage;
if (health <= 0)
{
OnDeath();
}
}
public void Heal(int healing)
{
health += healing;
health = Math.Clamp(health, 0, maxHealth);
}
protected virtual void OnDeath()
{
}
}