summaryrefslogtreecommitdiff
path: root/scripts/hoop.gd
blob: 87af2806af1806777c356516d84bb6117974a5b8 (plain)
1
2
3
4
5
6
7
8
9
10
extends StaticBody2D

signal score

func _on_Area2D_body_exited(_body):
	# Prevent scoring multiple points with one basketball throw.
	if !global_variables.has_scored:
		global_variables.score += 1
		emit_signal ("score")
		global_variables.has_scored = true