check internal state in _input()
This commit is contained in:
parent
7b25ae028b
commit
23ca5db700
2 changed files with 9 additions and 5 deletions
|
@ -87,6 +87,13 @@ func _ready() -> void:
|
|||
shuffle(difficulty)
|
||||
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
func _input(event):
|
||||
if $AnimationPlayer.is_playing():
|
||||
# Disable input during animation
|
||||
return
|
||||
|
||||
var game_state = get_node_or_null("/root/Main/GameState") as GameState
|
||||
if game_state != null:
|
||||
match game_state.current_state:
|
||||
|
@ -97,11 +104,6 @@ func _process(delta):
|
|||
GameState.State.GAME_OVER:
|
||||
return
|
||||
|
||||
func _input(event):
|
||||
if $AnimationPlayer.is_playing():
|
||||
# Disable input during animation
|
||||
return
|
||||
|
||||
#
|
||||
# Handle keyboard input
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue