summaryrefslogtreecommitdiff
path: root/scripts/hoop.gd
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/hoop.gd')
-rw-r--r--scripts/hoop.gd5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/hoop.gd b/scripts/hoop.gd
index d5574c6..61e2b99 100644
--- a/scripts/hoop.gd
+++ b/scripts/hoop.gd
@@ -13,3 +13,8 @@ func _on_Area2D_body_exited(_body):
func _on_Basketball_reset():
has_scored = false
+
+func _input(event):
+ if event.is_action_pressed("ui_accept"):
+ global_variables.score += 1
+ emit_signal ("score")