Files
MovementTests/interfaces/IHealthable.cs
2026-01-23 13:31:11 +01:00

18 lines
486 B
C#

using System;
using Godot;
namespace Movementtests.interfaces;
public record HealthChangedRecord(float CurrentHealth, float PreviousHealth, float MaxHealth);
public interface IHealthable
{
event Action<IHealthable, HealthChangedRecord> HealthChanged;
event Action<IHealthable> HealthDepleted;
[Export] RHealth RHealth { get; set; }
float CurrentHealth { get; set; }
HealthChangedRecord ReduceHealth(IDamageable source, DamageRecord damageRecord);
}