소스 검색

Mark the input as handled once proceed

May optimize engine flow.
DricomDragon 5 년 전
부모
커밋
5bf585112f
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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()