blob: aba0b2beaeb2deb59e3589292c8fae8575ffe234 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
extends StaticBody2D
signal score
func _ready():
global_variables.hoop_position = position.x
func _on_Area2D_body_exited(_body):
# Prevent scoring multiple points with one basketball throw.
if !global_variables.has_scored:
global_variables.has_scored = true
emit_signal ("score")
|