Sign test

This commit is contained in:
2025-05-13 08:59:42 -05:00
parent 54feb2ce55
commit 3b7da70e42
4 changed files with 73 additions and 1 deletions

22
scripts/Entity/Sign.gd Normal file
View File

@@ -0,0 +1,22 @@
class_name Sign extends StaticBody3D
@export var interactEvent:Event = null
func _ready() -> void:
$Entity/EntityInteractable.onInteract.connect(
self.onEntityInteract
)
func _exit_tree() -> void:
$Entity/EntityInteractable.onInteract.disconnect(
self.onEntityInteract
)
func onEntityInteract(
interactor:EntityInteractor,
interactee:EntityInteractable
) -> void:
if interactEvent == null || (interactEvent.started && !interactEvent.isDone()):
return
interactEvent.onEntityInteract(interactor, $Entity/EntityInteractable)

View File

@@ -0,0 +1 @@
uid://bitykguiignfu