Explorar el Código

Mark the input as handled once proceed

May optimize engine flow.
DricomDragon hace 5 años
padre
commit
5bf585112f
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      Player.gd

+ 2 - 0
Player.gd

@@ -57,8 +57,10 @@ func _unhandled_input(event):
 	if event.is_pressed():
 		if event.is_action(turn_left_action):
 			dire_delta = -1
+			get_tree().set_input_as_handled()
 		elif event.is_action(turn_right_action):
 			dire_delta = 1
+			get_tree().set_input_as_handled()
 
 func _on_game_start():
 	move()