a game about throwing hammers made for the github game off
Diffstat (limited to 'ui/start.gd')
-rw-r--r--ui/start.gd14
1 files changed, 12 insertions, 2 deletions
diff --git a/ui/start.gd b/ui/start.gd
index 4ace680..2d725f4 100644
--- a/ui/start.gd
+++ b/ui/start.gd
@@ -1,7 +1,17 @@
extends Popuppable
+
func _ready() -> void:
- open()
+ open()
+ var buttons := get_tree().get_nodes_in_group(&"button")
+ var play_sound := func plays() -> void: randomize() ; SoundManager.play("click", -10, randf_range(.9, 1.1))
+ for butt in buttons:
+ if butt is Button:
+ butt.pressed.connect(play_sound)
+ elif butt is RemapButton:
+ butt.button.pressed.connect(play_sound)
+ butt.clear.pressed.connect(play_sound)
+
func exit() -> void:
- pass
+ pass