extends Area3D
## World player hitbox

signal ball_collision(ball: GameBall)

@onready var shot_setup: ShotSetup = $".."


func _on_ball_entered(ball: GameBall) -> void:
	# TODO generalize this in the future if we have multiple players on teams
	if ball != shot_setup.game_ball:
		ball_collision.emit(ball)


func _on_body_entered(body: Node3D) -> void:
	if body is GameBall:
		_on_ball_entered(body as GameBall)
