everything_has_a_price_jam/commands/command_button.gd
2026-09-26 23:54:33 -06:00

14 lines
211 B
GDScript

extends Button
signal command_succcess(c: Command)
@export var command: Command
func _ready() -> void:
sync()
func sync():
text = command.name
func _on_pressed() -> void:
command_succcess.emit(command)