Cleaned and improved some event stuff
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user