Leaderboard

This commit is contained in:
2024-08-09 14:55:45 +08:00
parent 40b0f2e176
commit 8390fb2794
9 changed files with 191 additions and 3 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=10 format=3 uid="uid://bjhmjrldq4lkt"]
[gd_scene load_steps=11 format=3 uid="uid://bjhmjrldq4lkt"]
[ext_resource type="PackedScene" uid="uid://b3gx0bl43lku3" path="res://Scenes/Player.tscn" id="1_vby0g"]
[ext_resource type="PackedScene" uid="uid://dk8x2aeq1eevf" path="res://Scenes/UI/BootScreen.tscn" id="2_7aede"]
@ -8,6 +8,7 @@
[ext_resource type="Script" path="res://Scripts/Logic/World.cs" id="3_xwguj"]
[ext_resource type="PackedScene" uid="uid://bb704b0kpwwkr" path="res://Scenes/UI/PlayerDiedScreen.tscn" id="5_pimes"]
[ext_resource type="PackedScene" uid="uid://c7w5sgq0bshk0" path="res://Scenes/UI/HUD.tscn" id="5_qvun1"]
[ext_resource type="PackedScene" uid="uid://dfoy57v3q4of5" path="res://Scenes/UI/Leaderboard.tscn" id="7_j24m7"]
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_gyspy"]
properties/0/path = NodePath(".:RoundProgress")
@ -37,6 +38,10 @@ script = ExtResource("3_as2wg")
[node name="OverlayLayer" type="CanvasLayer" parent="."]
[node name="Leaderboard" parent="OverlayLayer" node_paths=PackedStringArray("Scoreboard") instance=ExtResource("7_j24m7")]
visible = false
Scoreboard = NodePath("../../ScoreboardNode")
[node name="Hud" parent="OverlayLayer" node_paths=PackedStringArray("World") instance=ExtResource("5_qvun1")]
visible = false
World = NodePath("../../World")

View File

@ -94,7 +94,7 @@ text = "(0, 0)"
[node name="RoundLabel" type="Label" parent="BottomBox/HBox"]
layout_mode = 2
size_flags_horizontal = 3
text = "Round 1"
text = "Round 01/20"
horizontal_alignment = 1
[node name="ScoreLabel" type="Label" parent="BottomBox/HBox"]

View File

@ -0,0 +1,36 @@
[gd_scene load_steps=3 format=3 uid="uid://dfoy57v3q4of5"]
[ext_resource type="PackedScene" uid="uid://b8s2m7gujfmp6" path="res://Scenes/UI/LeaderboardRecord.tscn" id="1_mr7v4"]
[ext_resource type="Script" path="res://Scripts/UI/Leaderboard.cs" id="1_sbkyu"]
[node name="Leaderboard" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_sbkyu")
[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_left = 16.0
offset_top = 21.0
offset_right = 1136.0
offset_bottom = 85.0
theme_override_font_sizes/font_size = 24
text = "Leaderboard"
horizontal_alignment = 1
vertical_alignment = 1
[node name="List" type="VBoxContainer" parent="."]
layout_mode = 0
offset_left = 16.0
offset_top = 97.0
offset_right = 1136.0
offset_bottom = 631.0
theme_override_constants/separation = 16
[node name="LeaderboardRecord" parent="List" instance=ExtResource("1_mr7v4")]
custom_minimum_size = Vector2(2.08165e-12, 80)
layout_mode = 2

View File

@ -0,0 +1,53 @@
[gd_scene load_steps=2 format=3 uid="uid://b8s2m7gujfmp6"]
[ext_resource type="Script" path="res://Scripts/UI/LeaderboardRecord.cs" id="1_jc2uj"]
[node name="LeaderboardRecord" type="Control"]
layout_mode = 3
anchor_left = 0.014
anchor_top = 0.025
anchor_right = 0.986
anchor_bottom = 0.148
offset_left = -0.128
offset_top = -0.2
offset_right = 0.12793
offset_bottom = 0.0959988
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_jc2uj")
[node name="Panel" type="Panel" parent="."]
layout_mode = 0
offset_right = 1120.0
offset_bottom = 80.0
[node name="VBoxContainer" type="HBoxContainer" parent="Panel"]
layout_mode = 0
offset_right = 1120.0
offset_bottom = 80.0
[node name="PlaceTag" type="Label" parent="Panel/VBoxContainer"]
custom_minimum_size = Vector2(80, 80)
layout_mode = 2
size_flags_horizontal = 0
theme_override_font_sizes/font_size = 32
text = "1"
horizontal_alignment = 1
vertical_alignment = 1
[node name="NameTag" type="Label" parent="Panel/VBoxContainer"]
custom_minimum_size = Vector2(80, 80)
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 24
text = "Player"
vertical_alignment = 1
[node name="ScoreTag" type="Label" parent="Panel/VBoxContainer"]
custom_minimum_size = Vector2(80, 80)
layout_mode = 2
size_flags_horizontal = 8
theme_override_font_sizes/font_size = 32
text = "0"
horizontal_alignment = 1
vertical_alignment = 1