Make sure everything works in the loading folder.

This commit is contained in:
Relintai 2023-04-06 22:03:19 +02:00
parent c5459752a6
commit 8a0bc962ff
10 changed files with 17 additions and 29 deletions

View File

@ -34,6 +34,5 @@ multithread/thread_rid_pool_prealloc=60
[rendering] [rendering]
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true vram_compression/import_etc=true
vram_compression/import_etc2=false vram_compression/import_etc2=false

View File

@ -196,7 +196,6 @@ anims/move_around = SubResource( 1 )
[node name="Camera2D" type="Camera2D" parent="."] [node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2( 512, 300 ) offset = Vector2( 512, 300 )
current = true
[node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="CanvasLayer" type="CanvasLayer" parent="."]

View File

@ -104,6 +104,5 @@ ui_end={
[rendering] [rendering]
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true vram_compression/import_etc=true
vram_compression/import_etc2=false vram_compression/import_etc2=false

View File

@ -18,6 +18,5 @@ config/icon="res://icon.png"
[rendering] [rendering]
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true vram_compression/import_etc=true
vram_compression/import_etc2=false vram_compression/import_etc2=false

View File

@ -14,10 +14,6 @@ config/name="Scene Changer"
config/description="This uses functions in SceneTree to switch between two scenes." config/description="This uses functions in SceneTree to switch between two scenes."
run/main_scene="res://scene_a.tscn" run/main_scene="res://scene_a.tscn"
[debug]
gdscript/warnings/return_value_discarded=false
[display] [display]
window/dpi/allow_hidpi=true window/dpi/allow_hidpi=true
@ -30,6 +26,5 @@ singletons=[ ]
[rendering] [rendering]
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true vram_compression/import_etc=true
vram_compression/import_etc2=false vram_compression/import_etc2=false

View File

@ -64,7 +64,6 @@ move_right={
[rendering] [rendering]
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true vram_compression/import_etc=true
vram_compression/import_etc2=false vram_compression/import_etc2=false
environment/default_clear_color=Color( 0.133333, 0.2, 0.266667, 1 ) environment/default_clear_color=Color( 0.133333, 0.2, 0.266667, 1 )

View File

@ -10,15 +10,15 @@
[sub_resource type="RectangleShape2D" id=1] [sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 32, 32 ) extents = Vector2( 32, 32 )
[sub_resource type="StyleBoxFlat" id=2] [sub_resource type="StyleBoxFlat" id=3]
bg_color = Color( 0.45098, 1, 0.152941, 1 ) bg_color = Color( 0, 0, 0, 0.25098 )
corner_radius_top_left = 16 corner_radius_top_left = 16
corner_radius_top_right = 16 corner_radius_top_right = 16
corner_radius_bottom_right = 16 corner_radius_bottom_right = 16
corner_radius_bottom_left = 16 corner_radius_bottom_left = 16
[sub_resource type="StyleBoxFlat" id=3] [sub_resource type="StyleBoxFlat" id=2]
bg_color = Color( 0, 0, 0, 0.25098 ) bg_color = Color( 0.45098, 1, 0.152941, 1 )
corner_radius_top_left = 16 corner_radius_top_left = 16
corner_radius_top_right = 16 corner_radius_top_right = 16
corner_radius_bottom_right = 16 corner_radius_bottom_right = 16
@ -44,8 +44,8 @@ margin_left = -32.0
margin_top = -40.0 margin_top = -40.0
margin_right = 32.0 margin_right = 32.0
margin_bottom = -34.0 margin_bottom = -34.0
custom_styles/fg = SubResource( 2 )
custom_styles/bg = SubResource( 3 ) custom_styles/bg = SubResource( 3 )
custom_styles/fg = SubResource( 2 )
value = 100.0 value = 100.0
percent_visible = false percent_visible = false
__meta__ = { __meta__ = {
@ -84,12 +84,12 @@ __meta__ = {
[node name="SaveLoad" type="GridContainer" parent="Control/VBoxContainer"] [node name="SaveLoad" type="GridContainer" parent="Control/VBoxContainer"]
margin_right = 269.0 margin_right = 269.0
margin_bottom = 78.0 margin_bottom = 78.0
custom_constants/vseparation = 8
custom_constants/hseparation = 8 custom_constants/hseparation = 8
custom_constants/vseparation = 8
columns = 2 columns = 2
[node name="SaveConfigFile" type="Button" parent="Control/VBoxContainer/SaveLoad"] [node name="SaveConfigFile" type="Button" parent="Control/VBoxContainer/SaveLoad"]
margin_right = 130.0 margin_right = 131.0
margin_bottom = 35.0 margin_bottom = 35.0
rect_min_size = Vector2( 0, 35 ) rect_min_size = Vector2( 0, 35 )
size_flags_horizontal = 3 size_flags_horizontal = 3
@ -99,8 +99,8 @@ game_node = NodePath("../../../../Game")
player_node = NodePath("../../../../Game/Player") player_node = NodePath("../../../../Game/Player")
[node name="LoadConfigFile" type="Button" parent="Control/VBoxContainer/SaveLoad"] [node name="LoadConfigFile" type="Button" parent="Control/VBoxContainer/SaveLoad"]
margin_left = 138.0 margin_left = 139.0
margin_right = 268.0 margin_right = 269.0
margin_bottom = 35.0 margin_bottom = 35.0
rect_min_size = Vector2( 0, 35 ) rect_min_size = Vector2( 0, 35 )
size_flags_horizontal = 3 size_flags_horizontal = 3
@ -111,7 +111,7 @@ player_node = NodePath("../../../../Game/Player")
[node name="SaveJSON" type="Button" parent="Control/VBoxContainer/SaveLoad"] [node name="SaveJSON" type="Button" parent="Control/VBoxContainer/SaveLoad"]
margin_top = 43.0 margin_top = 43.0
margin_right = 130.0 margin_right = 131.0
margin_bottom = 78.0 margin_bottom = 78.0
rect_min_size = Vector2( 0, 35 ) rect_min_size = Vector2( 0, 35 )
size_flags_horizontal = 3 size_flags_horizontal = 3
@ -121,9 +121,9 @@ game_node = NodePath("../../../../Game")
player_node = NodePath("../../../../Game/Player") player_node = NodePath("../../../../Game/Player")
[node name="LoadJSON" type="Button" parent="Control/VBoxContainer/SaveLoad"] [node name="LoadJSON" type="Button" parent="Control/VBoxContainer/SaveLoad"]
margin_left = 138.0 margin_left = 139.0
margin_top = 43.0 margin_top = 43.0
margin_right = 268.0 margin_right = 269.0
margin_bottom = 78.0 margin_bottom = 78.0
rect_min_size = Vector2( 0, 35 ) rect_min_size = Vector2( 0, 35 )
size_flags_horizontal = 3 size_flags_horizontal = 3

View File

@ -20,16 +20,16 @@ func save_game():
# JSON doesn't support complex types such as Vector2. # JSON doesn't support complex types such as Vector2.
# `var2str()` can be used to convert any Variant to a String. # `var2str()` can be used to convert any Variant to a String.
var save_dict = { var save_dict = {
player = { "player": {
position = var2str(player.position), "position": var2str(player.position),
health = var2str(player.health), "health": var2str(player.health),
}, },
enemies = [] "enemies": []
} }
for enemy in get_tree().get_nodes_in_group("enemy"): for enemy in get_tree().get_nodes_in_group("enemy"):
save_dict.enemies.push_back({ save_dict.enemies.push_back({
position = var2str(enemy.position), "position": var2str(enemy.position),
}) })
file.store_line(to_json(save_dict)) file.store_line(to_json(save_dict))

View File

@ -30,6 +30,5 @@ multithread/thread_rid_pool_prealloc=60
[rendering] [rendering]
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true vram_compression/import_etc=true
vram_compression/import_etc2=false vram_compression/import_etc2=false

View File

@ -22,6 +22,5 @@ position = Vector2( 494, 336 )
[node name="Camera2D" type="Camera2D" parent="."] [node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2( 512, 300 ) offset = Vector2( 512, 300 )
current = true
[connection signal="pressed" from="Load" to="." method="_on_load_pressed"] [connection signal="pressed" from="Load" to="." method="_on_load_pressed"]