Signal context

This commit is contained in:
Rendo 2025-07-22 19:24:34 +05:00
commit b4bf3ab8bc
13 changed files with 112 additions and 72 deletions

View file

@ -83,9 +83,16 @@ public partial class LevelRunner : Node
waveTimer.WaitTime = resource.waves[waveIndex].customWaveDelay > 0 ? resource.waves[waveIndex].customWaveDelay : resource.standardWaveDelay;
waveTimer.Start();
}
private void OnHPChanged(float delta)
private void OnHPChanged(EntitySignalContext context)
{
waveHealth += delta;
waveHealth = 0;
foreach (var zombie in zombies)
{
if (zombie != null)
{
waveHealth += zombie.GetHPMixed();
}
}
if (waveIndex == resource.waves.Count - 1) return;