final wave animation
This commit is contained in:
parent
6d9edc0dc2
commit
f2e4768b7e
5 changed files with 74 additions and 2 deletions
|
|
@ -15,6 +15,7 @@ public partial class LevelRunner : Node
|
|||
[Signal] public delegate void WaveChangedEventHandler(int to);
|
||||
[Signal] public delegate void HugeWaveApproachingCallbackEventHandler();
|
||||
[Signal] public delegate void HugeWaveInitiatedEventHandler(int waveNumber);
|
||||
[Signal] public delegate void FinalWaveInitiatedEventHandler();
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
|
|
@ -23,6 +24,7 @@ public partial class LevelRunner : Node
|
|||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (waveIndex == resource.waves.Count - 1) return;
|
||||
if (waveTimer.TimeLeft < approachNotificationTime && resource.waves[waveIndex + 1].isHugeWave && hugeWaveApproaching == false)
|
||||
{
|
||||
hugeWaveApproaching = true;
|
||||
|
|
@ -48,7 +50,11 @@ public partial class LevelRunner : Node
|
|||
if (resource.waves[waveIndex].isHugeWave) EmitSignal(SignalName.HugeWaveInitiated, waveIndex);
|
||||
rowSpawner.Add(resource.waves[waveIndex].zombiesOrdered);
|
||||
|
||||
if (waveIndex == resource.waves.Count - 1) return;
|
||||
if (waveIndex == resource.waves.Count - 1)
|
||||
{
|
||||
EmitSignal(SignalName.FinalWaveInitiated);
|
||||
return;
|
||||
}
|
||||
|
||||
waveTimer.WaitTime = resource.waves[waveIndex].customWaveDelay > 0 ? resource.waves[waveIndex].customWaveDelay : resource.standardWaveDelay;
|
||||
waveTimer.Start();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue