From c0863ef10290723272106e870ed7bb034360a733 Mon Sep 17 00:00:00 2001 From: Dukantic Date: Tue, 9 Sep 2025 11:12:33 +0200 Subject: [PATCH] fix --- project.godot | 1 + scene/load_screen.tscn | 9 +++++---- scene/score_saver.tscn | 2 +- script/score_saver.gd | 10 ++++++---- script/ui.gd | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/project.godot b/project.godot index 3500765..0d4b2a1 100644 --- a/project.godot +++ b/project.godot @@ -26,6 +26,7 @@ GameController="*res://game_controller.gd" window/size/viewport_width=640 window/size/viewport_height=640 +window/size/mode=3 window/stretch/mode="viewport" window/stretch/scale_mode="integer" window/vsync/vsync_mode=0 diff --git a/scene/load_screen.tscn b/scene/load_screen.tscn index 53a2654..e3db47b 100644 --- a/scene/load_screen.tscn +++ b/scene/load_screen.tscn @@ -45,16 +45,17 @@ func _ready() -> void: 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) + \"e \" + tableau_paires[i][\"key\"] + \" : \" + str(tableau_paires[i][\"value\"]) + 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) + \"e \" + \"---- : ----\" + text += \"\\n\" + str(tableau_paires.size()+ i+1) + \". \" + \"---- : ----\" " [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]}) @@ -62,10 +63,10 @@ func _ready() -> void: 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) + \"e \" + tableau_paires[i][\"key\"] + \" : \" + str(tableau_paires[i][\"value\"]) + 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) + \"e \" + \"---- : ----\" + text += \"\\n\" + str(tableau_paires.size()+ i+1) + \". \" + \"---- : ----\" " [node name="load_screen" type="Node2D"] diff --git a/scene/score_saver.tscn b/scene/score_saver.tscn index c227a72..c3d6d7d 100644 --- a/scene/score_saver.tscn +++ b/scene/score_saver.tscn @@ -87,7 +87,7 @@ offset_top = 2.0 offset_right = 638.0 offset_bottom = 424.0 theme = ExtResource("1_sa1is") -theme_override_font_sizes/font_size = 64 +theme_override_font_sizes/font_size = 32 text = "Player Name 0/15:" horizontal_alignment = 1 vertical_alignment = 1 diff --git a/script/score_saver.gd b/script/score_saver.gd index 052c644..72d910d 100644 --- a/script/score_saver.gd +++ b/script/score_saver.gd @@ -6,10 +6,11 @@ var player_name := "" func _ready() -> void: + label_name.text = "Score:" + str(GameController.actual_score) + "\n" if GameController.is_multiplayer: - label_name.text = "Team Name 0/8:" + label_name.text += "Team Name 0/8:" else: - label_name.text = "Player Name 0/8:" + label_name.text += "Player Name 0/8:" func _on_item_list_item_activated(index: int) -> void: @@ -24,9 +25,10 @@ func _on_item_list_item_activated(index: int) -> void: elif nbr < 8: player_name += temp nbr = player_name.length() + label_name.text = "Score:" + str(GameController.actual_score) + "\n" if GameController.is_multiplayer: - label_name.text = "Team Name " + label_name.text += "Team Name " else: - label_name.text = "Player Name " + label_name.text += "Player Name " label_name.text += str(nbr) +"/8:\n" + player_name diff --git a/script/ui.gd b/script/ui.gd index 2e7198f..8acab10 100644 --- a/script/ui.gd +++ b/script/ui.gd @@ -15,7 +15,7 @@ func _process(delta: float) -> void: time += delta func update_score(add : int, ast_pos: Vector2)->void: - var temp = 2 ** (5-add) * (1 + (time / 100)) + var temp = 1.5 ** (5-add) * (1 + (time / 100)) spawn_score(temp,ast_pos) score += temp label_score.text = str(score)