Sixth Map
This commit is contained in:
@ -20,6 +20,15 @@ func LoadMap4() -> void:
|
||||
get_tree().change_scene_to_file("res://Game/Maps/map_4.tscn")
|
||||
pass # Replace with function body.
|
||||
|
||||
func LoadMap5() -> void:
|
||||
get_tree().change_scene_to_file("res://Game/Maps/map_5.tscn")
|
||||
pass # Replace with function body.
|
||||
|
||||
func LoadMap6() -> void:
|
||||
get_tree().change_scene_to_file("res://Game/Maps/map_6.tscn")
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
loadData()
|
||||
@ -27,6 +36,8 @@ func _ready() -> void:
|
||||
get_node("VBoxContainer/HBoxContainer/second/Button").connect("button_up", LoadMap2)
|
||||
get_node("VBoxContainer/HBoxContainer/third/Button").connect("button_up", LoadMap3)
|
||||
get_node("VBoxContainer/HBoxContainer/fourth/Button").connect("button_up", LoadMap4)
|
||||
get_node("VBoxContainer/HBoxContainer/fith/Button").connect("button_up", LoadMap5)
|
||||
get_node("VBoxContainer/HBoxContainer/sixth/Button").connect("button_up", LoadMap6)
|
||||
|
||||
var unlocker = true
|
||||
for i in get_node("VBoxContainer").get_children():
|
||||
@ -56,15 +67,20 @@ func loadData() -> void:
|
||||
get_node("VBoxContainer/HBoxContainer/second/Label2").text = "Haven't finished yet" if map_scores["Map2"] == 0 else "Scored: " + str(map_scores["Map2"]) + " out of 10"
|
||||
get_node("VBoxContainer/HBoxContainer/third/Label2").text = "Haven't finished yet" if map_scores["Map3"] == 0 else "Scored: " + str(map_scores["Map3"]) + " out of 10"
|
||||
get_node("VBoxContainer/HBoxContainer/fourth/Label2").text = "Haven't finished yet" if map_scores["Map4"] == 0 else "Scored: " + str(map_scores["Map4"]) + " out of 10"
|
||||
get_node("VBoxContainer/HBoxContainer/fith/Label2").text = "Haven't finished yet" if map_scores["Map5"] == 0 else "Scored: " + str(map_scores["Map5"]) + " out of 10"
|
||||
get_node("VBoxContainer/HBoxContainer/sixth/Label2").text = "Haven't finished yet" if map_scores["Map6"] == 0 else "Scored: " + str(map_scores["Map6"]) + " out of 10"
|
||||
|
||||
else:
|
||||
map_scores["Map1"] = 0
|
||||
map_scores["Map2"] = 0
|
||||
map_scores["Map3"] = 0
|
||||
map_scores["Map4"] = 0
|
||||
map_scores["Map5"] = 0
|
||||
map_scores["Map6"] = 0
|
||||
|
||||
save_scores()
|
||||
loadData()
|
||||
pass
|
||||
|
||||
|
||||
func save_scores():
|
||||
|
||||
Reference in New Issue
Block a user