split gravity logic, various bug fixes
fixed gravity strength being possibly strong at level beginning fixed restarting being allowed after getting the last ring fixed save file's "played_for" being reset or set to another file's fixed the displayed save file total play time not being updated on main menu maybe there's other stuff
This commit is contained in:
parent
38897c706a
commit
709ce8eea3
11 changed files with 131 additions and 106 deletions
|
@ -198,6 +198,21 @@ ambient_light_source = 3
|
|||
ambient_light_color = Color(0.986752, 0.986752, 0.986752, 1)
|
||||
reflected_light_source = 2
|
||||
|
||||
[sub_resource type="Animation" id="Animation_j2kye"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("../../WorldEnvironment:environment:sky:sky_material:energy_multiplier")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [1.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gma2u"]
|
||||
resource_name = "sky_brightness"
|
||||
length = 0.3
|
||||
|
@ -215,21 +230,6 @@ tracks/0/keys = {
|
|||
"values": [1.0, 1.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_j2kye"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("../../WorldEnvironment:environment:sky:sky_material:energy_multiplier")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [1.0]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_wruj6"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_j2kye"),
|
||||
|
|
|
@ -8,19 +8,25 @@ signal request_start
|
|||
@onready var label_name = $VBoxContainer/MarginContainer/VBoxContainer/Description/Name
|
||||
@onready var label_time = $VBoxContainer/MarginContainer/VBoxContainer/Description/Time
|
||||
|
||||
## Get the newest \"played_for\" when the main menu appears again
|
||||
func _enter_tree() -> void:
|
||||
if len(SaveFiles.selected_file):
|
||||
display_file_data(SaveFiles.selected_file)
|
||||
|
||||
func _on_save_1_pressed() -> void:
|
||||
label_name.text = $VBoxContainer/Save1.text
|
||||
display_file_data(SaveFiles.read(SaveFiles.names[0]))
|
||||
display_file_data(SaveFiles.names[0])
|
||||
|
||||
func _on_save_2_pressed() -> void:
|
||||
label_name.text = $VBoxContainer/Save2.text
|
||||
display_file_data(SaveFiles.read(SaveFiles.names[1]))
|
||||
display_file_data(SaveFiles.names[1])
|
||||
|
||||
func _on_save_3_pressed() -> void:
|
||||
label_name.text = $VBoxContainer/Save3.text
|
||||
display_file_data(SaveFiles.read(SaveFiles.names[2]))
|
||||
display_file_data(SaveFiles.names[2])
|
||||
|
||||
func display_file_data(data: Variant) -> void:
|
||||
func display_file_data(file_name: String) -> void:
|
||||
var data = SaveFiles.read(file_name)
|
||||
$VBoxContainer/MarginContainer.show()
|
||||
label_time.text = \" | \"
|
||||
if data.has(\"played_for\") and data.played_for is float:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue