Refactor stats

This commit is contained in:
2025-10-22 16:24:07 -07:00
parent 6ec45c4805
commit f0c4e65783
77 changed files with 565 additions and 372 deletions

View File

@@ -0,0 +1,26 @@
using Chickensoft.Collections;
using Chickensoft.Serialization;
namespace Zennysoft.Ma.Adapter;
public interface IHealthComponent
{
[Save("current_hp")]
public IAutoProp<int> CurrentHP { get; }
[Save("maximum_hp")]
public IAutoProp<int> MaximumHP { get; }
public event Action? HealthReachedZero;
public event Action? DamageTaken;
public bool AtFullHealth { get; }
public void Heal(int healAmount);
public void Damage(int damageAmount);
public void SetHealth(int health);
public void RaiseMaximumHP(int raiseAmount);
}