A bunch more maps
This commit is contained in:
@ -28,8 +28,19 @@ func LoadMap6() -> void:
|
||||
get_tree().change_scene_to_file("res://Game/Maps/map_6.tscn")
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func LoadMap7() -> void:
|
||||
get_tree().change_scene_to_file("res://Game/Maps/map_7.tscn")
|
||||
pass # Replace with function body.
|
||||
|
||||
func LoadMap8() -> void:
|
||||
get_tree().change_scene_to_file("res://Game/Maps/map_8.tscn")
|
||||
pass # Replace with function body.
|
||||
|
||||
func LoadMap9() -> void:
|
||||
get_tree().change_scene_to_file("res://Game/Maps/map_9.tscn")
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
loadData()
|
||||
get_node("VBoxContainer/HBoxContainer/first/Button").connect("button_up", LoadMap1)
|
||||
@ -38,6 +49,9 @@ func _ready() -> void:
|
||||
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)
|
||||
get_node("VBoxContainer/HBoxContainer2/seventh/Button").connect("button_up", LoadMap7)
|
||||
get_node("VBoxContainer/HBoxContainer2/eighth/Button").connect("button_up", LoadMap8)
|
||||
get_node("VBoxContainer/HBoxContainer2/nineth/Button").connect("button_up", LoadMap9)
|
||||
|
||||
var unlocker = true
|
||||
for i in get_node("VBoxContainer").get_children():
|
||||
@ -61,7 +75,6 @@ func loadData() -> void:
|
||||
|
||||
if file:
|
||||
map_scores = file.get_var()
|
||||
print(map_scores)
|
||||
file.close()
|
||||
get_node("VBoxContainer/HBoxContainer/first/Label2").text = "Haven't finished yet" if map_scores["Map1"] == 0 else "Scored: " + str(map_scores["Map1"]) + " out of 10"
|
||||
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"
|
||||
@ -69,6 +82,9 @@ func loadData() -> void:
|
||||
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"
|
||||
get_node("VBoxContainer/HBoxContainer2/seventh/Label2").text = "Haven't finished yet" if map_scores["Map7"] == 0 else "Scored: " + str(map_scores["Map7"]) + " out of 10"
|
||||
get_node("VBoxContainer/HBoxContainer2/eighth/Label2").text = "Haven't finished yet" if map_scores["Map8"] == 0 else "Scored: " + str(map_scores["Map8"]) + " out of 10"
|
||||
get_node("VBoxContainer/HBoxContainer2/nineth/Label2").text = "Haven't finished yet" if map_scores["Map9"] == 0 else "Scored: " + str(map_scores["Map9"]) + " out of 10"
|
||||
|
||||
else:
|
||||
map_scores["Map1"] = 0
|
||||
@ -77,6 +93,9 @@ func loadData() -> void:
|
||||
map_scores["Map4"] = 0
|
||||
map_scores["Map5"] = 0
|
||||
map_scores["Map6"] = 0
|
||||
map_scores["Map7"] = 0
|
||||
map_scores["Map8"] = 0
|
||||
map_scores["Map9"] = 0
|
||||
|
||||
save_scores()
|
||||
loadData()
|
||||
|
||||
Reference in New Issue
Block a user