123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- class_name InputPromptsCenter
- extends CenterContainer
- ## Manage the display of several inputs prompts
- @onready var WalkPrompts: Control = $InputPromptsCollection/WalkPrompts
- @onready var VehiclePrompts: Control = $InputPromptsCollection/VehiclePrompts
- @onready var JeepPrompts: Control = $InputPromptsCollection/VehiclePrompts/JeepPrompts
- @onready var PlanePrompts: Control = $InputPromptsCollection/VehiclePrompts/PlanePrompts
- func _on_title_screen_start_game() -> void:
- _enable(WalkPrompts)
- _disable_vehicle_prompts()
- func _on_victory_menu_visibility_changed() -> void:
- queue_free()
- func _enable(prompts: Control) -> void:
- prompts.set_visible(true)
- prompts.set_process_mode(Node.PROCESS_MODE_PAUSABLE)
- func _disable(prompts: Control) -> void:
- prompts.set_visible(false)
- prompts.set_process_mode(Node.PROCESS_MODE_DISABLED)
- func _enable_vehicle_prompts_of(vehicle: SeatedVehicle) -> void:
- _enable(VehiclePrompts)
- if vehicle is Jeep:
- _enable(JeepPrompts)
- if vehicle is Biplan or vehicle is TinyPlane:
- _enable(PlanePrompts)
- func _disable_vehicle_prompts() -> void:
- _disable(JeepPrompts)
- _disable(PlanePrompts)
- _disable(VehiclePrompts)
- func _on_main_walker_got_in(vehicle: SeatedVehicle) -> void:
- _disable(WalkPrompts)
- _enable_vehicle_prompts_of(vehicle)
- func _on_main_walker_got_out() -> void:
- _enable(WalkPrompts)
- _disable_vehicle_prompts()
|