Cleaned and improved some event stuff

This commit is contained in:
2025-05-26 13:11:27 -05:00
parent c1d8dd46d8
commit d6a2f4b567
27 changed files with 296 additions and 108 deletions

View File

@@ -38,6 +38,9 @@ func getRaycastInteractable() -> EntityInteractable:
return interactable
func _process(delta: float) -> void:
if !entity or entity.isPaused():
return
match interactorType:
InteractorType.PLAYER_INPUT:
_processPlayerInput()
@@ -49,6 +52,10 @@ func _process(delta: float) -> void:
func _processPlayerInput() -> void:
if !Input.is_action_just_pressed("interact"):
return
# Conditions where player cannot interact.
if UI.hasInteractionFocus():
return
var interactable:EntityInteractable = getRaycastInteractable()
if interactable: