input_prompts_center.gd 839 B

1234567891011121314151617181920212223242526272829303132333435
  1. class_name InputPromptsCenter
  2. extends CenterContainer
  3. ## Manage the display of several inputs prompts
  4. @onready var WalkPrompts: Control = $InputPromptsCollection/WalkPrompts
  5. @onready var VehiclePrompts: Control = $InputPromptsCollection/VehiclePrompts
  6. func _on_title_screen_start_game() -> void:
  7. _enable(WalkPrompts)
  8. func _on_victory_menu_visibility_changed() -> void:
  9. queue_free()
  10. func _enable(prompts: Control) -> void:
  11. prompts.set_visible(true)
  12. prompts.set_process_mode(Node.PROCESS_MODE_PAUSABLE)
  13. func _disable(prompts: Control) -> void:
  14. prompts.set_visible(false)
  15. prompts.set_process_mode(Node.PROCESS_MODE_DISABLED)
  16. func _on_main_walker_got_in(vehicle: SeatedVehicle) -> void:
  17. _disable(WalkPrompts)
  18. _enable(VehiclePrompts)
  19. func _on_main_walker_got_out() -> void:
  20. _enable(WalkPrompts)
  21. _disable(VehiclePrompts)