Fixed last bugs
This commit is contained in:
@@ -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)
|
||||
|
@@ -14,7 +14,6 @@ enum InteractorType {
|
||||
|
||||
func interactWith(interactable:EntityInteractable) -> void:
|
||||
interactable.interact(self)
|
||||
pass
|
||||
|
||||
func getRaycastInteractable() -> EntityInteractable:
|
||||
if !entityDirection or !characterBody:
|
||||
|
Reference in New Issue
Block a user