16 lines
341 B
GDScript
16 lines
341 B
GDScript
extends Area3D
|
|
class_name MapBounds
|
|
|
|
func _ready() -> void:
|
|
pass
|
|
|
|
func _on_body_entered(body: Node3D) -> void:
|
|
if (!body is OverworldEntity):
|
|
return
|
|
(body as OverworldEntity).withinMapBounds = self;
|
|
|
|
func _on_body_exited(body: Node3D) -> void:
|
|
if (!body is OverworldEntity):
|
|
return
|
|
(body as OverworldEntity).withinMapBounds = null;
|