fix: Fixed input problems (#440)

Authored-by: Dennis Ploeger <develop@dieploegers.de>
This commit is contained in:
Julian Murgia authored and GitHub committed 2021-11-14 13:36:59 +01:00
1 parent eb04020a92
commit c4d1432d66
3 files changed
+7 -6

No files matched your search

@@ -82,7 +82,7 @@ func _ready():
#
# #### Parameters
# - event: Event received
func _input(event) -> void:
func _unhandled_input(event) -> void:
if not escoria.current_state == escoria.GAME_STATE.DEFAULT:
return
if InputMap.has_action("switch_action_verb") \
@@ -34,9 +34,10 @@ func _ready():
#
# - event: The input event
func _input(event):
if event is InputEventMouseButton and \
event.pressed:
if event is InputEventMouseButton and event.pressed \
and is_speaking:
speedup()
get_tree().set_input_as_handled()
# Find the matching voice output file for the given key