disable input during animation

This commit is contained in:
Fabien Freling 2019-12-09 23:54:35 +01:00
parent 6753848c8f
commit 09ff1b79f9
2 changed files with 5 additions and 0 deletions

View file

@ -63,6 +63,10 @@ func compute_piece_size() -> int:
return int(min(w_size, h_size))
func _input(event):
if $AnimationPlayer.is_playing():
# Disable input during animation
return
if event.is_action_pressed("ui_up"):
move_piece(Direction.DOWN)
if event.is_action_pressed("ui_down"):