Cleaned and improved some event stuff
This commit is contained in:
1 parent
c1d8dd46d8
commit
d6a2f4b567
27 files changed
+296
-108
No files matched your search
@@ -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