MagicNStuff/source/components/ui/menus/loading_screen/loading_screen.gd
SchimmelSpreu83 c7f96c78c4 Huge changes
Implemented spawn points correctly.
Added saving & loading (currently only implemented with the spawn_index).
You can now set spawn indicies in the DynamicAreaLoader to automatically load when the game is set to that value (on ready).
Added configuration warnings to DynamicAreaLoader & PlayerSpawnPoint

Added some generic translation (pot) files.
Added AudioManager autoload to play, stop, fade audio streams (and set the bus directly).
Added SceneFader autoload.
Added SaveManager autoload.
Added OptionsMenu with currently only volume sliders and a fullscreen toggle button.
Added PauseMenu
2025-03-01 13:28:21 +01:00

20 lines
591 B
GDScript

class_name LoadingScreen
extends MenuBase
var _interactive_loader: InteractiveLoader
@onready var progress_bar: ProgressBar = %ProgressBar
func _process(_delta: float) -> void:
if is_instance_valid(_interactive_loader) and not _interactive_loader.load_progress.is_empty():
progress_bar.value = _interactive_loader.load_progress.front()
func load_scene(path: String) -> PackedScene:
_interactive_loader = InteractiveLoader.new()
add_child(_interactive_loader)
var resource: Object = await _interactive_loader.load_threaded(path)
_interactive_loader.queue_free()
return resource