spawning
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m59s

This commit is contained in:
2026-01-17 23:18:06 +01:00
parent 561e026834
commit 65538495c4
20 changed files with 146 additions and 60 deletions

View File

@@ -9,17 +9,18 @@ public partial class CHealth : Node, IHealthable
public event Action<IHealthable> HealthDepleted;
[Export]
public RHealth HealthResource;
public RHealth RHealth { get; set; }
public float CurrentHealth { get; set; }
public override void _Ready()
{
CurrentHealth = HealthResource.StartingHealth;
CurrentHealth = RHealth.StartingHealth;
}
public void ReduceHealth(IDamageable source, float amount)
{
GD.Print(CurrentHealth);
CurrentHealth -= amount;
HealthChanged?.Invoke(this, CurrentHealth);