18 lines
486 B
C#
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);
|
|
} |