diff options
author | Spartan322 <Megacake1234@gmail.com> | 2023-07-06 22:28:55 +0200 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2023-07-09 01:24:10 +0200 |
commit | 86bee7b44c7cc7adaef8cdf441667a99223dd98a (patch) | |
tree | 5004d04dbe607dedf273afdee7dff783f4d980ed /game/src/Game/GameStart.tscn | |
parent | 5838c2508682bc3f6e35e44056f9ba229bca4571 (diff) |
Add GameLoader Autoload to handle global loading data
Remove GameDebug, Localization, and ShaderManager from Events.gd
Renamed OptionsSingleton class_name to OptionsEventsObject
Add Events.Loader to handle Loader events (which are global signals)
Make GameDebug singleton with static functions and property
Make Localization functions static
Move ShaderManager variable to GameLoader
Move Events._define_filepaths_dict to GameLoader.define_filepaths_dict
Move game initialization from LoadingScreen.gd and Events.gd to GameStart.gd
Attach GameStart.gd to GameStart.tscn root
Make LoadingScreen generalized and so it is reusable
Remove class_name from LoaderingScreen.gd
Diffstat (limited to 'game/src/Game/GameStart.tscn')
-rw-r--r-- | game/src/Game/GameStart.tscn | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/game/src/Game/GameStart.tscn b/game/src/Game/GameStart.tscn index 6cc358d..f16daa3 100644 --- a/game/src/Game/GameStart.tscn +++ b/game/src/Game/GameStart.tscn @@ -1,18 +1,21 @@ -[gd_scene load_steps=6 format=3 uid="uid://1udsn4mggep2"] +[gd_scene load_steps=7 format=3 uid="uid://1udsn4mggep2"] +[ext_resource type="Script" path="res://src/Game/GameStart.gd" id="1_e0cos"] [ext_resource type="PackedScene" uid="uid://3kktdpfnc0sn" path="res://src/Game/LoadingScreen.tscn" id="2_h0oiw"] [ext_resource type="Script" path="res://src/Game/SplashContainer.gd" id="2_xmcgv"] [ext_resource type="Texture2D" uid="uid://deef5hufq0j61" path="res://splash_assets/splash_end.png" id="3_qfv12"] [ext_resource type="Texture2D" uid="uid://cgdnixsyh7bja" path="res://splash_assets/splash_image.png" id="4_5b6yq"] [ext_resource type="VideoStream" path="res://splash_assets/splash_startup.ogv" id="5_8euyy"] -[node name="GameStartup" type="Control"] +[node name="GameStartup" type="Control" node_paths=PackedStringArray("loading_screen")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +script = ExtResource("1_e0cos") +loading_screen = NodePath("LoadingScreen") [node name="LoadingScreen" parent="." instance=ExtResource("2_h0oiw")] visible = false @@ -48,5 +51,8 @@ stream = ExtResource("5_8euyy") autoplay = true expand = true -[connection signal="splash_end" from="SplashContainer" to="LoadingScreen" method="_on_splash_container_splash_end"] +[connection signal="load_changed" from="LoadingScreen" to="." method="_on_loading_screen_load_changed"] +[connection signal="load_ended" from="LoadingScreen" to="." method="_on_loading_screen_load_ended"] +[connection signal="load_started" from="LoadingScreen" to="." method="_on_loading_screen_load_started"] +[connection signal="splash_end" from="SplashContainer" to="." method="_on_splash_container_splash_end"] [connection signal="finished" from="SplashContainer/SplashVideo" to="SplashContainer" method="_on_splash_startup_finished"] |