extends Node2D @onready var wave_1 = [$Viruling, $Viruling2, $Viruling3] @onready var wave_2 = [$Viruling4, $Viruling5, $Viruling6, $Viruling7] var complete = false var wave_2_start = false # Called when the node enters the scene tree for the first time. func _ready() -> void: for viruling in wave_1: viruling.charge() # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: for viruling in wave_1: if viruling.is_dying: wave_1.erase(viruling) for viruling in wave_2: if viruling.is_dying: wave_2.erase(viruling) if wave_1 == [] and !wave_2_start: wave_2_start = true for viruling in wave_2: viruling.charge() if wave_2 == []: complete = true func is_complete() -> bool: return complete