Refactor stats
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user