Using existing signal

Instead of creating an additional signal, it is also possible to pass the Enemy instance in the existing signal.

func spawn_path_enemy():
	var enemy_instance = path_enemy_scene.instantiate()
	emit_signal("enemy_spawned", enemy_instance.enemy)

This way you don’t need to create an additional signal and can simply reuse the existing one.

1 Like

Privacy & Terms