Almost fixed entities

This commit is contained in:
2025-05-12 21:00:13 -05:00
parent 828ff03e56
commit a575b8a47d
13 changed files with 158 additions and 79 deletions

View File

@@ -1 +1,16 @@
class_name BasicNPCEntity extends CharacterBody3D
@export var interactEvent:Event = null
func _ready() -> void:
$Entity/EntityInteractable.onInteract.connect(
self.onEntityInteract
)
func onEntityInteract(
interactor:EntityInteractor,
interactee:EntityInteractable
) -> void:
if interactEvent == null || interactEvent.started:
return
interactEvent.onEntityInteract(interactor, $Entity/EntityInteractable)