15
scripts/MapBounds.gd
Normal file
15
scripts/MapBounds.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
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;
|
Reference in New Issue
Block a user