bodypartfighter/BodyConfig/LoadBodyParts.gd
2020-02-01 13:44:14 +01:00

15 lines
391 B
GDScript

extends VBoxContainer
# Called when the node enters the scene tree for the first time.
func _ready():
for entry in BodyPartLoader.bodyparts:
var button = Button.new()
button.text = entry
add_child(button)
button.connect("pressed", get_parent().get_parent().get_parent(), "body_part_chosen", [button.text])
func button_pressed(params):
emit_signal("choose_bodypart", params[0])