final is here

This commit is contained in:
2025-09-08 21:58:22 +02:00
parent 2781204d6d
commit f91ae53533
20 changed files with 269 additions and 74 deletions

View File

@@ -11,8 +11,8 @@ colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0.772549, 1, 1, 1, 0)
emitting = false
amount = 16
texture = ExtResource("1_4xjek")
lifetime = 2.5
one_shot = true
speed_scale = 2.0
explosiveness = 0.5
randomness = 0.46
spread = 180.0

View File

@@ -43,9 +43,12 @@ func _ready() -> void:
# Trier par ordre alphabétique
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())):
text += \"\\n\" + tableau_paires[i][\"key\"] + \" : \" + str(tableau_paires[i][\"value\"])
text += \"\\n\" + str(i+1) + \"e \" + 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 \" + \"---- : ----\"
"
[sub_resource type="GDScript" id="GDScript_u3kfb"]
@@ -53,14 +56,16 @@ script/source = "extends Label
func _ready() -> void:
var tableau_paires = []
for key in GameController.score.score_multiplayer:
print(key)
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\"
text += \" 2 Players\"
for i in range(clamp(5, 0, tableau_paires.size())):
text += \"\\n\" + tableau_paires[i][\"key\"] + \" : \" + str(tableau_paires[i][\"value\"])
text += \"\\n\" + str(i+1) + \"e \" + 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 \" + \"---- : ----\"
"
[node name="load_screen" type="Node2D"]
@@ -82,9 +87,11 @@ load_screen = true
[node name="Control" type="Control" parent="CanvasLayer"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2
@@ -95,10 +102,10 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -75.5
offset_top = -55.0
offset_right = 75.5
offset_bottom = 55.0
offset_left = -119.5
offset_top = -64.0
offset_right = 119.5
offset_bottom = 64.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 64
@@ -137,16 +144,19 @@ script = SubResource("GDScript_7iavl")
[node name="scores" type="VBoxContainer" parent="CanvasLayer/Control/HBoxContainer"]
layout_mode = 2
theme = ExtResource("3_7iavl")
theme_override_constants/separation = 64
[node name="Label" type="Label" parent="CanvasLayer/Control/HBoxContainer/scores"]
layout_mode = 2
theme = ExtResource("3_7iavl")
theme_override_font_sizes/font_size = 16
script = SubResource("GDScript_dogtj")
[node name="Label2" type="Label" parent="CanvasLayer/Control/HBoxContainer/scores"]
layout_mode = 2
theme = ExtResource("3_7iavl")
theme_override_font_sizes/font_size = 16
script = SubResource("GDScript_u3kfb")
[connection signal="pressed" from="CanvasLayer/Control/HBoxContainer/buttons/1" to="CanvasLayer/Control/HBoxContainer/buttons/1" method="_on_pressed"]

View File

@@ -19,6 +19,7 @@ rotation = -1.5708
[node name="CharacterBody2D2" parent="." instance=ExtResource("2_xilri")]
position = Vector2(115, -33)
rotation = -1.5708
player_2 = true
[node name="spawner" parent="." node_paths=PackedStringArray("player") instance=ExtResource("3_hepd6")]
player = NodePath("../CharacterBody2D")

View File

@@ -0,0 +1,52 @@
[gd_scene load_steps=6 format=3 uid="uid://hdekde5crm8g"]
[ext_resource type="Theme" uid="uid://b46gto6k33wqr" path="res://theme.tres" id="1_g3ehp"]
[ext_resource type="Script" uid="uid://5cghvv2m23uq" path="res://script/score_particles.gd" id="1_yb0l5"]
[sub_resource type="ViewportTexture" id="ViewportTexture_yb0l5"]
viewport_path = NodePath("SubViewport")
[sub_resource type="Curve" id="Curve_g3ehp"]
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.0695971, 1), 4.42277, 4.42277, 0, 0, Vector2(0.267399, 1), -2.49704, -2.49704, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 4
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_fmxq6"]
[node name="score_particles" type="CPUParticles2D" node_paths=PackedStringArray("label")]
emitting = false
amount = 1
texture = SubResource("ViewportTexture_yb0l5")
lifetime = 2.5
one_shot = true
randomness = 1.0
direction = Vector2(100, 0)
spread = 180.0
gravity = Vector2(0, 0)
initial_velocity_min = 50.0
initial_velocity_max = 100.0
angular_velocity_min = -20.0
angular_velocity_max = 20.0
linear_accel_max = 50.0
scale_amount_curve = SubResource("Curve_g3ehp")
script = ExtResource("1_yb0l5")
label = NodePath("SubViewport/Label")
[node name="SubViewport" type="SubViewport" parent="."]
transparent_bg = true
size = Vector2i(640, 32)
[node name="Label" type="Label" parent="SubViewport"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -18.0
offset_top = -16.0
offset_right = 18.0
offset_bottom = 16.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_g3ehp")
theme_override_styles/normal = SubResource("StyleBoxEmpty_fmxq6")
text = "+23"

View File

@@ -31,8 +31,8 @@ grow_vertical = 2
[node name="ItemList" type="ItemList" parent="Control"]
layout_mode = 0
offset_top = 425.0
offset_right = 641.0
offset_top = 426.0
offset_right = 640.0
offset_bottom = 640.0
theme = ExtResource("1_sa1is")
auto_width = true
@@ -82,11 +82,15 @@ script = SubResource("GDScript_sa1is")
[node name="Label" type="Label" parent="Control"]
layout_mode = 1
offset_right = 463.0
offset_bottom = 160.0
offset_left = 2.0
offset_top = 2.0
offset_right = 638.0
offset_bottom = 424.0
theme = ExtResource("1_sa1is")
theme_override_font_sizes/font_size = 64
text = "Player Name 0/15:"
horizontal_alignment = 1
vertical_alignment = 1
[connection signal="item_activated" from="Control/ItemList" to="." method="_on_item_list_item_activated"]
[connection signal="item_selected" from="Control/ItemList" to="." method="_on_item_list_item_selected"]

View File

@@ -42,6 +42,7 @@ _data = {
}
[node name="CharacterBody2D" type="CharacterBody2D" node_paths=PackedStringArray("animation", "target")]
collision_priority = 100.0
script = ExtResource("1_4cq66")
SHOOT_NODE = ExtResource("2_v4325")
TIME_INVUL = 2.0
@@ -60,6 +61,7 @@ libraries = {
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PackedVector2Array(14, 2, 14, -2, -9, -10, -13, -10, -14, -9, -14, 8, -13, 9, -9, 9)
one_way_collision_margin = 10.0
[node name="Node2D" type="Node2D" parent="."]
position = Vector2(15, 0)

View File

@@ -4,7 +4,7 @@
[ext_resource type="Script" uid="uid://dsd0opfd8kyow" path="res://script/shoot.gd" id="1_vnmmp"]
[sub_resource type="CircleShape2D" id="CircleShape2D_yt1ub"]
radius = 5.0
radius = 4.0
[node name="shoot" type="RigidBody2D"]
collision_layer = 2
@@ -16,9 +16,8 @@ SPEED = 400.0
[node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 1
position = Vector2(0.4, 0.565)
texture = ExtResource("1_ttj7r")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_yt1ub")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View File

@@ -61,8 +61,10 @@ anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -40.0
offset_top = -23.0
offset_left = -29.0
offset_top = -38.0
offset_right = -2.0
offset_bottom = -2.0
grow_horizontal = 0
grow_vertical = 0
theme = ExtResource("1_s2f8l")