fix some bug and new export

This commit is contained in:
2025-09-09 23:52:08 +02:00
parent c0bf7b0fb8
commit 09c0dfe072
24 changed files with 261 additions and 49 deletions

View File

@@ -36,37 +36,15 @@ func _on_pressed() -> void:
[sub_resource type="GDScript" id="GDScript_dogtj"]
script/source = "extends Label
func _ready() -> void:
var tableau_paires = []
for key in GameController.score.score_singleplayer:
tableau_paires.append({\"key\": key, \"value\": GameController.score.score_singleplayer[key]})
# Trier par ordre alphabétique
tableau_paires.sort_custom(func(a, b): return a[\"value\"] > b[\"value\"])
text += \" 1 Player\"
for i in range(clamp(5, 0, tableau_paires.size())):
text += \"\\n\" + str(i+1) + \". \" + tableau_paires[i][\"key\"] + \" : \" + str(tableau_paires[i][\"value\"])
if tableau_paires.size() < 5:
for i in range(5 - tableau_paires.size()):
text += \"\\n\" + str(tableau_paires.size()+ i+1) + \". \" + \"---- : ----\"
func _ready() -> void:
text = GameController.get_scoreboard_singleplayer()
"
[sub_resource type="GDScript" id="GDScript_u3kfb"]
script/source = "extends Label
func _ready() -> void:
var tableau_paires = []
for key in GameController.score.score_multiplayer:
tableau_paires.append({\"key\": key, \"value\": GameController.score.score_multiplayer[key]})
# Trier par ordre alphabétique
tableau_paires.sort_custom(func(a, b): return a[\"value\"] > b[\"value\"])
text += \" 2 Players\"
for i in range(clamp(5, 0, tableau_paires.size())):
text += \"\\n\" + str(i+1) + \". \" + tableau_paires[i][\"key\"] + \" : \" + str(tableau_paires[i][\"value\"])
if tableau_paires.size() < 5:
for i in range(5 - tableau_paires.size()):
text += \"\\n\" + str(tableau_paires.size()+ i+1) + \". \" + \"---- : ----\"
text = GameController.get_scoreboard_multiplayer()
"
[node name="load_screen" type="Node2D"]