added green attack, enemy
This commit is contained in:
parent
f852b0a30e
commit
2bf9db610e
43 changed files with 673 additions and 246 deletions
|
|
@ -3,14 +3,18 @@ class_name WaveNode extends Node2D
|
|||
@export var spawn_interval := 0.2
|
||||
signal finished;
|
||||
var entities := 0;
|
||||
var started_wave = false
|
||||
|
||||
func _ready() -> void:
|
||||
entities = get_child_count()
|
||||
|
||||
func spawn_wave():
|
||||
if started_wave: return
|
||||
|
||||
started_wave = true
|
||||
if get_child_count() == 0:
|
||||
finished.emit()
|
||||
return;
|
||||
return
|
||||
|
||||
for c : Spawner in get_children():
|
||||
c.spawn();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue