fix
This commit is contained in:
@@ -26,6 +26,7 @@ GameController="*res://game_controller.gd"
|
|||||||
|
|
||||||
window/size/viewport_width=640
|
window/size/viewport_width=640
|
||||||
window/size/viewport_height=640
|
window/size/viewport_height=640
|
||||||
|
window/size/mode=3
|
||||||
window/stretch/mode="viewport"
|
window/stretch/mode="viewport"
|
||||||
window/stretch/scale_mode="integer"
|
window/stretch/scale_mode="integer"
|
||||||
window/vsync/vsync_mode=0
|
window/vsync/vsync_mode=0
|
||||||
|
|||||||
@@ -45,16 +45,17 @@ func _ready() -> void:
|
|||||||
tableau_paires.sort_custom(func(a, b): return a[\"value\"] > b[\"value\"])
|
tableau_paires.sort_custom(func(a, b): return a[\"value\"] > b[\"value\"])
|
||||||
text += \" 1 Player\"
|
text += \" 1 Player\"
|
||||||
for i in range(clamp(5, 0, tableau_paires.size())):
|
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:
|
if tableau_paires.size() < 5:
|
||||||
for i in range(5 - tableau_paires.size()):
|
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"]
|
[sub_resource type="GDScript" id="GDScript_u3kfb"]
|
||||||
script/source = "extends Label
|
script/source = "extends Label
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
var tableau_paires = []
|
var tableau_paires = []
|
||||||
|
|
||||||
for key in GameController.score.score_multiplayer:
|
for key in GameController.score.score_multiplayer:
|
||||||
tableau_paires.append({\"key\": key, \"value\": GameController.score.score_multiplayer[key]})
|
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\"])
|
tableau_paires.sort_custom(func(a, b): return a[\"value\"] > b[\"value\"])
|
||||||
text += \" 2 Players\"
|
text += \" 2 Players\"
|
||||||
for i in range(clamp(5, 0, tableau_paires.size())):
|
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:
|
if tableau_paires.size() < 5:
|
||||||
for i in range(5 - tableau_paires.size()):
|
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"]
|
[node name="load_screen" type="Node2D"]
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ offset_top = 2.0
|
|||||||
offset_right = 638.0
|
offset_right = 638.0
|
||||||
offset_bottom = 424.0
|
offset_bottom = 424.0
|
||||||
theme = ExtResource("1_sa1is")
|
theme = ExtResource("1_sa1is")
|
||||||
theme_override_font_sizes/font_size = 64
|
theme_override_font_sizes/font_size = 32
|
||||||
text = "Player Name 0/15:"
|
text = "Player Name 0/15:"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|||||||
@@ -6,10 +6,11 @@ var player_name := ""
|
|||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
label_name.text = "Score:" + str(GameController.actual_score) + "\n"
|
||||||
if GameController.is_multiplayer:
|
if GameController.is_multiplayer:
|
||||||
label_name.text = "Team Name 0/8:"
|
label_name.text += "Team Name 0/8:"
|
||||||
else:
|
else:
|
||||||
label_name.text = "Player Name 0/8:"
|
label_name.text += "Player Name 0/8:"
|
||||||
|
|
||||||
|
|
||||||
func _on_item_list_item_activated(index: int) -> void:
|
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:
|
elif nbr < 8:
|
||||||
player_name += temp
|
player_name += temp
|
||||||
nbr = player_name.length()
|
nbr = player_name.length()
|
||||||
|
label_name.text = "Score:" + str(GameController.actual_score) + "\n"
|
||||||
if GameController.is_multiplayer:
|
if GameController.is_multiplayer:
|
||||||
label_name.text = "Team Name "
|
label_name.text += "Team Name "
|
||||||
else:
|
else:
|
||||||
label_name.text = "Player Name "
|
label_name.text += "Player Name "
|
||||||
label_name.text += str(nbr) +"/8:\n" + player_name
|
label_name.text += str(nbr) +"/8:\n" + player_name
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ func _process(delta: float) -> void:
|
|||||||
time += delta
|
time += delta
|
||||||
|
|
||||||
func update_score(add : int, ast_pos: Vector2)->void:
|
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)
|
spawn_score(temp,ast_pos)
|
||||||
score += temp
|
score += temp
|
||||||
label_score.text = str(score)
|
label_score.text = str(score)
|
||||||
|
|||||||
Reference in New Issue
Block a user