allow clearing props

This commit is contained in:
KawaiiZenbo 2025-10-25 18:14:36 -07:00
parent 7f1f49adbb
commit c0c4a15434
15 changed files with 47 additions and 1 deletions

View file

@ -255,9 +255,14 @@ func _on_spawn_button_pressed() -> void:
var spawningProp = load(Props.SpawnableProps[selectedIndex]["path"]).instantiate()
var vector = get_node("../Camera/SpawnPosition").global_position
spawningProp.position = vector
get_tree().root.add_child(spawningProp)
get_node("../../PropHandle").add_child(spawningProp)
func _on_spawn_menu_button_pressed() -> void:
$BG.visible = false
$SpawnMenu.visible = true
func _on_clear_button_pressed() -> void:
for prop in get_node("../../PropHandle").get_children():
prop.queue_free()