Fixed last bugs

This commit is contained in:
2025-05-12 21:02:55 -05:00
parent a575b8a47d
commit 54feb2ce55
2 changed files with 7 additions and 2 deletions

View File

@@ -7,10 +7,16 @@ func _ready() -> void:
self.onEntityInteract
)
func _exit_tree() -> void:
$Entity/EntityInteractable.onInteract.disconnect(
self.onEntityInteract
)
func onEntityInteract(
interactor:EntityInteractor,
interactee:EntityInteractable
) -> void:
if interactEvent == null || interactEvent.started:
if interactEvent == null || (interactEvent.started && !interactEvent.isDone()):
return
interactEvent.onEntityInteract(interactor, $Entity/EntityInteractable)

View File

@@ -14,7 +14,6 @@ enum InteractorType {
func interactWith(interactable:EntityInteractable) -> void:
interactable.interact(self)
pass
func getRaycastInteractable() -> EntityInteractable:
if !entityDirection or !characterBody: