Save/Load rework

This commit is contained in:
2026-03-01 14:10:51 +01:00
parent d4a533bf17
commit b24addcee6
42 changed files with 1315 additions and 154 deletions
-22
View File
@@ -1,22 +0,0 @@
extends ColorRect
@onready var animation = $FadingMaskAnimation
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
hide()
#Handles fading transitions
func fade_in():
modulate.a = 0.0
show()
animation.play("fade_in")
func fade_out():
animation.play("fade_out")
await animation.animation_finished
hide()
@@ -1 +0,0 @@
uid://dbjei4d2lfwnb
@@ -1,30 +0,0 @@
extends CanvasLayer
@onready var fading_mask = $FadingMask
@onready var its_game_over = $ITSGameOver
@onready var mask = $Mask
signal transition_finished
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass
#Transitions the scenes with a fading mask
func transition(scenes_to_hide, scenes_to_show):
#Fade in
fading_mask.fade_in()
await fading_mask.animation.animation_finished
#Hides and show appropriates scenes
for scene in scenes_to_hide:
scene.hide()
for scene in scenes_to_show:
scene.show()
#Fade out
fading_mask.fade_out()
await fading_mask.animation.animation_finished
transition_finished.emit()
@@ -1 +0,0 @@
uid://dywfa5vbgtrkb
@@ -1,7 +1,39 @@
[gd_scene load_steps=7 format=3 uid="uid://drk1l7ijo4xq5"]
[gd_scene load_steps=7 format=3 uid="uid://ct7ccfv6yj73u"]
[ext_resource type="Script" uid="uid://dywfa5vbgtrkb" path="res://Scenes/transition_screen/transition_screen.gd" id="1_hbjtk"]
[ext_resource type="Script" uid="uid://dbjei4d2lfwnb" path="res://Scenes/transition_screen/fading_mask.gd" id="2_m3r4n"]
[ext_resource type="Script" uid="uid://dbjei4d2lfwnb" path="res://Scenes/UI/fading_mask.gd" id="2_m3r4n"]
[sub_resource type="GDScript" id="GDScript_3575e"]
script/source = "extends CanvasLayer
@onready var fading_mask = $FadingMask
@onready var its_game_over = $ITSGameOver
@onready var mask = $Mask
signal transition_finished
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass
#Transitions the scenes with a fading mask
func transition(scenes_to_hide, scenes_to_show):
#Fade in
fading_mask.fade_in()
await fading_mask.animation.animation_finished
#Hides and show appropriates scenes
for scene in scenes_to_hide:
scene.hide()
for scene in scenes_to_show:
scene.show()
#Fade out
fading_mask.fade_out()
await fading_mask.animation.animation_finished
transition_finished.emit()
"
[sub_resource type="Animation" id="Animation_n85x3"]
length = 0.001
@@ -56,8 +88,8 @@ _data = {
}
[node name="transition_screen" type="CanvasLayer"]
layer = 102
script = ExtResource("1_hbjtk")
layer = 98
script = SubResource("GDScript_3575e")
[node name="FadingMask" type="ColorRect" parent="."]
modulate = Color(0, 0, 0, 0)