Player.gd 408 B

1234567891011121314151617
  1. extends Node
  2. func _on_Monteri_query_driver(driver):
  3. driver.start_query()
  4. if Input.is_action_pressed("pad_brake"):
  5. driver.brake()
  6. else:
  7. if Input.is_action_pressed("pad_accelerate"):
  8. driver.accelerate()
  9. if Input.is_action_pressed("pad_left"):
  10. driver.turn_left()
  11. if Input.is_action_pressed("pad_right"):
  12. driver.turn_right()
  13. if Input.is_action_pressed("pad_reverse"):
  14. driver.reverse()