Files
fps_project_1/scripts/respawn_enemies_button.gd

8 lines
142 B
GDScript

extends Node3D
func _on_switch_1_switch_changed() -> void:
var parent = get_parent()
parent.number_of_enemies = 1
parent.spawn_enemies()