class_name BallZone extends Area3D
## A spatial area that has an effect on balls inside it.

@export var terrain_angular_damping := 1.0

@export var water_hazard := false


func _ready() -> void:
	body_entered.connect(_on_body_entered)
	body_exited.connect(_on_body_exited)


func _on_body_entered(body: Node3D) -> void:
	if body is GameBall:
		(body as GameBall).enter_zone(self)


func _on_body_exited(body: Node3D) -> void:
	if body is GameBall:
		(body as GameBall).exit_zone(self)
