Score saving, and loading

This commit is contained in:
2025-08-27 16:49:31 +02:00
parent 77d610eccb
commit 8108485091
5 changed files with 49 additions and 3 deletions

View File

@ -10,7 +10,7 @@ const enemies = [FORKMAN, COBOLD, ORK]
func _ready() -> void:
get_node("CanvasLayer/SidePanel").Update_Lifes(20)
get_node("CanvasLayer/SidePanel").set_Lifes(20)
get_node("CanvasLayer/SidePanel").Update_Coins(2000)
#the meaning of the columns inside my wave generation matris:
@ -31,7 +31,7 @@ func _on_timer_timeout() -> void:
if not get_node("Path2D").get_children():
endwave = false
get_node("CanvasLayer/SidePanel").Update_waves(currentwave + 1) #updating waves
if currentwave >= 5:
if currentwave >= 4: #!!!!! CHECKS FOR THE LAST WAVE IF NEW WAVES ARE ADDED CHANGE ACCORDINGLY!!!
get_node("CanvasLayer/SidePanel").GameWon()
else:
spawnMonster()

View File

@ -1549,7 +1549,7 @@ texture = ExtResource("65_ef8wx")
curve = SubResource("Curve2D_6abe5")
[node name="Timer" type="Timer" parent="."]
wait_time = 0.2
wait_time = 0.4
autostart = true
[node name="TrapArea" type="Area2D" parent="."]