feat: update the rematch, lobby, leaderboard

This commit is contained in:
2026-03-30 16:56:35 +08:00
parent 3035a221ba
commit fb20af1ae5
5 changed files with 140 additions and 121 deletions
+2 -1
View File
@@ -2241,7 +2241,8 @@ func _show_game_over_panel():
var rematch_label = Label.new() var rematch_label = Label.new()
rematch_label.name = "RematchVoteLabel" rematch_label.name = "RematchVoteLabel"
rematch_label.text = "0/2" var required_votes = max(1, ceili(LobbyManager.players_in_room.size() / 2.0))
rematch_label.text = "0/%d" % required_votes
rematch_label.add_theme_font_size_override("font_size", 24) rematch_label.add_theme_font_size_override("font_size", 24)
rematch_label.add_theme_color_override("font_color", Color(0.7, 0.7, 0.7)) rematch_label.add_theme_color_override("font_color", Color(0.7, 0.7, 0.7))
rematch_container.add_child(rematch_label) rematch_container.add_child(rematch_label)
+24
View File
@@ -350,6 +350,21 @@ func _ready():
if LobbyManager.get_randomize_spawn() and not spawn_point_selected: if LobbyManager.get_randomize_spawn() and not spawn_point_selected:
visible = false visible = false
_init_floor_spawn_anchor()
var floor_spawn_anchor: Node3D
func _init_floor_spawn_anchor():
floor_spawn_anchor = Node3D.new()
floor_spawn_anchor.name = "FloorSpawnAnchor"
floor_spawn_anchor.top_level = true
add_child(floor_spawn_anchor)
if floor_spawn_bot:
floor_spawn_bot.reparent(floor_spawn_anchor, false)
if floor_spawn_top:
floor_spawn_top.reparent(floor_spawn_anchor, false)
@onready var floor_spawn_bot: AnimatedSprite3D = $floor_spawn_bot @onready var floor_spawn_bot: AnimatedSprite3D = $floor_spawn_bot
@onready var floor_spawn_top: AnimatedSprite3D = $floor_spawn_top @onready var floor_spawn_top: AnimatedSprite3D = $floor_spawn_top
@onready var vfx_scatter_knock: AnimatedSprite3D = $scatter_knock @onready var vfx_scatter_knock: AnimatedSprite3D = $scatter_knock
@@ -359,6 +374,15 @@ func _ready():
#play_floor_spawn() #play_floor_spawn()
func play_floor_spawn(): func play_floor_spawn():
if not floor_spawn_anchor:
return
# Anchor detaches the visual effect from player's movement
if is_instance_valid(carried_tekton):
floor_spawn_anchor.global_position = Vector3(carried_tekton.global_position.x, global_position.y, carried_tekton.global_position.z)
else:
floor_spawn_anchor.global_position = global_position
floor_spawn_bot.visible = true floor_spawn_bot.visible = true
floor_spawn_top.visible = true floor_spawn_top.visible = true
floor_spawn_bot.play("floor_spawn_bot") floor_spawn_bot.play("floor_spawn_bot")
+45 -53
View File
@@ -1,22 +1,22 @@
[gd_scene format=3 uid="uid://c3q4w3j6e7y8u"] [gd_scene format=3 uid="uid://c3q4w3j6e7y8u"]
[ext_resource type="Script" uid="uid://d1e2f3g4h5i6j" path="res://scripts/ui/leaderboard_panel.gd" id="1"] [ext_resource type="Script" uid="uid://qe1nth1bnep8" path="res://scripts/ui/leaderboard_panel.gd" id="1"]
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"] [ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"]
[ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="3_font"] [ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="3_font"]
[ext_resource type="PackedScene" uid="uid://1vk0mjnwkngi" path="res://assets/characters/Masbro.glb" id="4_masbro"]
[ext_resource type="PackedScene" uid="uid://d4cul3w3wem5w" path="res://assets/characters/Gatot.glb" id="4_gatot"]
[ext_resource type="PackedScene" uid="uid://bmln7v6v5kvxg" path="res://assets/characters/Oldpop.glb" id="4_oldpop"]
[ext_resource type="PackedScene" uid="uid://ejeamn0pyey4" path="res://assets/characters/Bob.glb" id="4_bob"] [ext_resource type="PackedScene" uid="uid://ejeamn0pyey4" path="res://assets/characters/Bob.glb" id="4_bob"]
[ext_resource type="PackedScene" uid="uid://d4cul3w3wem5w" path="res://assets/characters/Gatot.glb" id="4_gatot"]
[ext_resource type="PackedScene" uid="uid://1vk0mjnwkngi" path="res://assets/characters/Masbro.glb" id="4_masbro"]
[ext_resource type="PackedScene" uid="uid://bmln7v6v5kvxg" path="res://assets/characters/Oldpop.glb" id="4_oldpop"]
[ext_resource type="AnimationLibrary" uid="uid://c3pyopnwibckj" path="res://assets/characters/animations/animation-pack.res" id="5_animlib"] [ext_resource type="AnimationLibrary" uid="uid://c3pyopnwibckj" path="res://assets/characters/animations/animation-pack.res" id="5_animlib"]
[sub_resource type="Environment" id="Environment_lb"] [sub_resource type="Environment" id="Environment_lb"]
background_mode = 1 background_mode = 1
background_color = Color(0.06, 0.07, 0.10, 1) background_color = Color(0.06, 0.07, 0.1, 1)
ambient_light_source = 2 ambient_light_source = 2
ambient_light_color = Color(0.5, 0.55, 0.75, 1) ambient_light_color = Color(0.5, 0.55, 0.75, 1)
ambient_light_energy = 0.7 ambient_light_energy = 0.7
[node name="LeaderboardPanel" type="Control"] [node name="LeaderboardPanel" type="Control" unique_id=2123026133]
layout_mode = 3 layout_mode = 3
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
@@ -26,7 +26,7 @@ grow_vertical = 2
theme = ExtResource("2") theme = ExtResource("2")
script = ExtResource("1") script = ExtResource("1")
[node name="Background" type="ColorRect" parent="."] [node name="Background" type="ColorRect" parent="." unique_id=1326531657]
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
@@ -35,7 +35,7 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
color = Color(0.05, 0.06, 0.09, 0.97) color = Color(0.05, 0.06, 0.09, 0.97)
[node name="MainLayout" type="HBoxContainer" parent="."] [node name="MainLayout" type="HBoxContainer" parent="." unique_id=53100533]
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
@@ -44,27 +44,26 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
theme_override_constants/separation = 0 theme_override_constants/separation = 0
[node name="LeftPanel" type="PanelContainer" parent="MainLayout"] [node name="LeftPanel" type="PanelContainer" parent="MainLayout" unique_id=125724276]
custom_minimum_size = Vector2(500, 0)
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_stretch_ratio = 1.0
custom_minimum_size = Vector2(500, 0)
[node name="LeftVBox" type="VBoxContainer" parent="MainLayout/LeftPanel"] [node name="LeftVBox" type="VBoxContainer" parent="MainLayout/LeftPanel" unique_id=1333726314]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 12 theme_override_constants/separation = 12
[node name="Header" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox"] [node name="Header" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox" unique_id=2015043023]
layout_mode = 2 layout_mode = 2
[node name="BackBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/Header"] [node name="BackBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/Header" unique_id=1330539196]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(44, 44) custom_minimum_size = Vector2(44, 44)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_font") theme_override_fonts/font = ExtResource("3_font")
text = "← BACK" text = "← BACK"
[node name="Title" type="Label" parent="MainLayout/LeftPanel/LeftVBox/Header"] [node name="Title" type="Label" parent="MainLayout/LeftPanel/LeftVBox/Header" unique_id=1037998429]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1) theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
@@ -73,46 +72,46 @@ theme_override_font_sizes/font_size = 26
text = "LEADERBOARD" text = "LEADERBOARD"
horizontal_alignment = 1 horizontal_alignment = 1
[node name="SortTabs" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox"] [node name="SortTabs" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox" unique_id=718289870]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 8 theme_override_constants/separation = 8
alignment = 1 alignment = 1
[node name="SortScoreBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/SortTabs"] [node name="SortScoreBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/SortTabs" unique_id=130573026]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(120, 36) custom_minimum_size = Vector2(120, 36)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_font") theme_override_fonts/font = ExtResource("3_font")
text = "High Score" text = "High Score"
[node name="SortWinRateBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/SortTabs"] [node name="SortWinRateBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/SortTabs" unique_id=1440940092]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(120, 36) custom_minimum_size = Vector2(120, 36)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_font") theme_override_fonts/font = ExtResource("3_font")
text = "Win Rate" text = "Win Rate"
[node name="SortGamesBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/SortTabs"] [node name="SortGamesBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/SortTabs" unique_id=1859306138]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(120, 36) custom_minimum_size = Vector2(120, 36)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_font") theme_override_fonts/font = ExtResource("3_font")
text = "Games Played" text = "Games Played"
[node name="HSeparator" type="HSeparator" parent="MainLayout/LeftPanel/LeftVBox"] [node name="HSeparator" type="HSeparator" parent="MainLayout/LeftPanel/LeftVBox" unique_id=1424980566]
layout_mode = 2 layout_mode = 2
[node name="ScrollContainer" type="ScrollContainer" parent="MainLayout/LeftPanel/LeftVBox"] [node name="ScrollContainer" type="ScrollContainer" parent="MainLayout/LeftPanel/LeftVBox" unique_id=1067011185]
layout_mode = 2 layout_mode = 2
size_flags_vertical = 3 size_flags_vertical = 3
[node name="LeaderboardList" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox/ScrollContainer"] [node name="LeaderboardList" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox/ScrollContainer" unique_id=1303389084]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
theme_override_constants/separation = 8 theme_override_constants/separation = 8
[node name="StatusLabel" type="Label" parent="MainLayout/LeftPanel/LeftVBox"] [node name="StatusLabel" type="Label" parent="MainLayout/LeftPanel/LeftVBox" unique_id=218097909]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1) theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
@@ -120,84 +119,77 @@ theme_override_fonts/font = ExtResource("3_font")
text = "Loading data..." text = "Loading data..."
horizontal_alignment = 1 horizontal_alignment = 1
[node name="RightPanel" type="SubViewportContainer" parent="MainLayout"] [node name="RightPanel" type="SubViewportContainer" parent="MainLayout" unique_id=733341277]
custom_minimum_size = Vector2(340, 0)
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_stretch_ratio = 0.8 size_flags_stretch_ratio = 0.8
custom_minimum_size = Vector2(340, 0)
stretch = true stretch = true
[node name="PreviewViewport" type="SubViewport" parent="MainLayout/RightPanel"] [node name="PreviewViewport" type="SubViewport" parent="MainLayout/RightPanel" unique_id=434116765]
unique_name_in_owner = true unique_name_in_owner = true
transparent_bg = true transparent_bg = true
size = Vector2i(500, 720) handle_input_locally = false
size = Vector2i(608, 720)
render_target_update_mode = 4
[node name="WorldEnvironment" type="WorldEnvironment" parent="MainLayout/RightPanel/PreviewViewport"] [node name="WorldEnvironment" type="WorldEnvironment" parent="MainLayout/RightPanel/PreviewViewport" unique_id=176076489]
environment = SubResource("Environment_lb") environment = SubResource("Environment_lb")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="MainLayout/RightPanel/PreviewViewport"] [node name="DirectionalLight3D" type="DirectionalLight3D" parent="MainLayout/RightPanel/PreviewViewport" unique_id=1487133814]
transform = Transform3D(0.866025, -0.25, 0.433013, 0, 0.866025, 0.5, -0.5, -0.433013, 0.75, 0, 4, 0) transform = Transform3D(0.866025, -0.25, 0.433013, 0, 0.866025, 0.5, -0.5, -0.433013, 0.75, 0, 4, 0)
light_energy = 1.4 light_energy = 1.4
[node name="FillLight" type="OmniLight3D" parent="MainLayout/RightPanel/PreviewViewport"] [node name="FillLight" type="OmniLight3D" parent="MainLayout/RightPanel/PreviewViewport" unique_id=1492921006]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 2, 2) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 2, 2)
light_color = Color(0.4, 0.5, 1.0, 1) light_color = Color(0.4, 0.5, 1, 1)
light_energy = 0.5 light_energy = 0.5
omni_range = 8.0 omni_range = 8.0
[node name="Camera3D" type="Camera3D" parent="MainLayout/RightPanel/PreviewViewport"] [node name="Camera3D" type="Camera3D" parent="MainLayout/RightPanel/PreviewViewport" unique_id=28500697]
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, 1.6, 3.2) transform = Transform3D(1, 0, 0, 0, 0.9659259, 0.25881898, 0, -0.25881898, 0.9659259, 0, 0.8380414, 3.2)
current = true current = true
fov = 40.0 fov = 40.0
[node name="CharacterRoot" type="Node3D" parent="MainLayout/RightPanel/PreviewViewport"] [node name="CharacterRoot" type="Node3D" parent="MainLayout/RightPanel/PreviewViewport" unique_id=1908332248]
unique_name_in_owner = true unique_name_in_owner = true
[node name="Masbro" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" instance=ExtResource("4_masbro")] [node name="Masbro" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" unique_id=1123428413 instance=ExtResource("4_masbro")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
visible = false visible = false
[node name="Bob" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" instance=ExtResource("4_bob")] [node name="Bob" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" unique_id=1443851131 instance=ExtResource("4_bob")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.484627, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.484627, 0)
visible = false visible = false
[node name="Gatot" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" instance=ExtResource("4_gatot")] [node name="Gatot" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" unique_id=1688463565 instance=ExtResource("4_gatot")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
visible = false visible = false
[node name="Oldpop" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" instance=ExtResource("4_oldpop")] [node name="Oldpop" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" unique_id=2101387155 instance=ExtResource("4_oldpop")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
[node name="AnimationPlayer" type="AnimationPlayer" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot"] [node name="AnimationPlayer" type="AnimationPlayer" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" unique_id=264395095]
root_node = NodePath("../Oldpop") root_node = NodePath("../Oldpop")
libraries/animation-pack = ExtResource("5_animlib") libraries/animation-pack = ExtResource("5_animlib")
current_animation = "animation-pack/idle" autoplay = &"animation-pack/idle"
autoplay = "animation-pack/idle"
[node name="SelectedPlayerInfo" type="VBoxContainer" parent="MainLayout/RightPanel"] [node name="SelectedPlayerInfo" type="VBoxContainer" parent="MainLayout/RightPanel" unique_id=1592883771]
layout_mode = 1 layout_mode = 2
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -120.0
offset_right = 340.0
grow_vertical = 0
theme_override_constants/separation = 4 theme_override_constants/separation = 4
[node name="SelectedNameLabel" type="Label" parent="MainLayout/RightPanel/SelectedPlayerInfo"] [node name="SelectedNameLabel" type="Label" parent="MainLayout/RightPanel/SelectedPlayerInfo" unique_id=1940372038]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1) theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_fonts/font = ExtResource("3_font") theme_override_fonts/font = ExtResource("3_font")
theme_override_font_sizes/font_size = 20 theme_override_font_sizes/font_size = 20
text = ""
horizontal_alignment = 1 horizontal_alignment = 1
[node name="SelectedRankLabel" type="Label" parent="MainLayout/RightPanel/SelectedPlayerInfo"] [node name="SelectedRankLabel" type="Label" parent="MainLayout/RightPanel/SelectedPlayerInfo" unique_id=994755781]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1) theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
theme_override_fonts/font = ExtResource("3_font") theme_override_fonts/font = ExtResource("3_font")
theme_override_font_sizes/font_size = 14 theme_override_font_sizes/font_size = 14
text = ""
horizontal_alignment = 1 horizontal_alignment = 1
+62 -62
View File
@@ -3,10 +3,10 @@
[ext_resource type="Script" uid="uid://y6wswtalyiho" path="res://scripts/ui/profile_panel.gd" id="1"] [ext_resource type="Script" uid="uid://y6wswtalyiho" path="res://scripts/ui/profile_panel.gd" id="1"]
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"] [ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"]
[ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="3_e13i6"] [ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="3_e13i6"]
[ext_resource type="PackedScene" uid="uid://1vk0mjnwkngi" path="res://assets/characters/Masbro.glb" id="4_masbro"]
[ext_resource type="PackedScene" uid="uid://d4cul3w3wem5w" path="res://assets/characters/Gatot.glb" id="4_gatot"]
[ext_resource type="PackedScene" uid="uid://bmln7v6v5kvxg" path="res://assets/characters/Oldpop.glb" id="4_oldpop"]
[ext_resource type="PackedScene" uid="uid://ejeamn0pyey4" path="res://assets/characters/Bob.glb" id="4_bob"] [ext_resource type="PackedScene" uid="uid://ejeamn0pyey4" path="res://assets/characters/Bob.glb" id="4_bob"]
[ext_resource type="PackedScene" uid="uid://d4cul3w3wem5w" path="res://assets/characters/Gatot.glb" id="4_gatot"]
[ext_resource type="PackedScene" uid="uid://1vk0mjnwkngi" path="res://assets/characters/Masbro.glb" id="4_masbro"]
[ext_resource type="PackedScene" uid="uid://bmln7v6v5kvxg" path="res://assets/characters/Oldpop.glb" id="4_oldpop"]
[ext_resource type="AnimationLibrary" uid="uid://c3pyopnwibckj" path="res://assets/characters/animations/animation-pack.res" id="5_animlib"] [ext_resource type="AnimationLibrary" uid="uid://c3pyopnwibckj" path="res://assets/characters/animations/animation-pack.res" id="5_animlib"]
[sub_resource type="Environment" id="Environment_preview"] [sub_resource type="Environment" id="Environment_preview"]
@@ -26,7 +26,7 @@ grow_vertical = 2
theme = ExtResource("2") theme = ExtResource("2")
script = ExtResource("1") script = ExtResource("1")
[node name="Background" type="ColorRect" parent="."] [node name="Background" type="ColorRect" parent="." unique_id=650894265]
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
@@ -35,7 +35,7 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
color = Color(0.05, 0.06, 0.09, 0.97) color = Color(0.05, 0.06, 0.09, 0.97)
[node name="MainLayout" type="HBoxContainer" parent="."] [node name="MainLayout" type="HBoxContainer" parent="." unique_id=730259035]
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
@@ -44,27 +44,26 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
theme_override_constants/separation = 0 theme_override_constants/separation = 0
[node name="LeftPanel" type="PanelContainer" parent="MainLayout"] [node name="LeftPanel" type="PanelContainer" parent="MainLayout" unique_id=282453419]
custom_minimum_size = Vector2(420, 0)
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_stretch_ratio = 1.0
custom_minimum_size = Vector2(420, 0)
[node name="LeftVBox" type="VBoxContainer" parent="MainLayout/LeftPanel"] [node name="LeftVBox" type="VBoxContainer" parent="MainLayout/LeftPanel" unique_id=322585038]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 16 theme_override_constants/separation = 16
[node name="Header" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox"] [node name="Header" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox" unique_id=1587238635]
layout_mode = 2 layout_mode = 2
[node name="BackBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/Header"] [node name="BackBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/Header" unique_id=303437283]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(44, 44) custom_minimum_size = Vector2(44, 44)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "← BACK" text = "← BACK"
[node name="Title" type="Label" parent="MainLayout/LeftPanel/LeftVBox/Header"] [node name="Title" type="Label" parent="MainLayout/LeftPanel/LeftVBox/Header" unique_id=1630320969]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
theme_override_colors/font_color = Color(0.41568628, 0.6392157, 0.14117648, 1) theme_override_colors/font_color = Color(0.41568628, 0.6392157, 0.14117648, 1)
@@ -72,55 +71,54 @@ theme_override_fonts/font = ExtResource("3_e13i6")
theme_override_font_sizes/font_size = 26 theme_override_font_sizes/font_size = 26
text = "PROFILE & LOADOUT" text = "PROFILE & LOADOUT"
[node name="Separator0" type="HSeparator" parent="MainLayout/LeftPanel/LeftVBox"] [node name="Separator0" type="HSeparator" parent="MainLayout/LeftPanel/LeftVBox" unique_id=1757294445]
layout_mode = 2 layout_mode = 2
[node name="AvatarSection" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox"] [node name="AvatarSection" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox" unique_id=579456932]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 16 theme_override_constants/separation = 16
alignment = 0
[node name="AvatarDisplay" type="TextureRect" parent="MainLayout/LeftPanel/LeftVBox/AvatarSection"] [node name="AvatarDisplay" type="TextureRect" parent="MainLayout/LeftPanel/LeftVBox/AvatarSection" unique_id=1604724524]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(80, 80) custom_minimum_size = Vector2(80, 80)
layout_mode = 2 layout_mode = 2
expand_mode = 1 expand_mode = 1
stretch_mode = 5 stretch_mode = 5
[node name="AvatarButtons" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox/AvatarSection"] [node name="AvatarButtons" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox/AvatarSection" unique_id=208948821]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
theme_override_constants/separation = 8 theme_override_constants/separation = 8
[node name="AccountType" type="Label" parent="MainLayout/LeftPanel/LeftVBox/AvatarSection/AvatarButtons"] [node name="AccountType" type="Label" parent="MainLayout/LeftPanel/LeftVBox/AvatarSection/AvatarButtons" unique_id=1334846162]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1) theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "Account: Guest" text = "Account: Guest"
[node name="ChangeAvatarBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/AvatarSection/AvatarButtons"] [node name="ChangeAvatarBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/AvatarSection/AvatarButtons" unique_id=215076479]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(0, 40) custom_minimum_size = Vector2(0, 40)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "Change Avatar" text = "Change Avatar"
[node name="DisplayNameSection" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox"] [node name="DisplayNameSection" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox" unique_id=1669216784]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 8 theme_override_constants/separation = 8
[node name="Label" type="Label" parent="MainLayout/LeftPanel/LeftVBox/DisplayNameSection"] [node name="Label" type="Label" parent="MainLayout/LeftPanel/LeftVBox/DisplayNameSection" unique_id=792928394]
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1) theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "Display Name" text = "Display Name"
[node name="HBox" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox/DisplayNameSection"] [node name="HBox" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox/DisplayNameSection" unique_id=1713677971]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 8 theme_override_constants/separation = 8
[node name="DisplayNameInput" type="LineEdit" parent="MainLayout/LeftPanel/LeftVBox/DisplayNameSection/HBox"] [node name="DisplayNameInput" type="LineEdit" parent="MainLayout/LeftPanel/LeftVBox/DisplayNameSection/HBox" unique_id=1087692485]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(0, 44) custom_minimum_size = Vector2(0, 44)
layout_mode = 2 layout_mode = 2
@@ -128,47 +126,47 @@ size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
max_length = 50 max_length = 50
[node name="SaveNameBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/DisplayNameSection/HBox"] [node name="SaveNameBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/DisplayNameSection/HBox" unique_id=518731018]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(80, 44) custom_minimum_size = Vector2(80, 44)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "Save" text = "Save"
[node name="Separator1" type="HSeparator" parent="MainLayout/LeftPanel/LeftVBox"] [node name="Separator1" type="HSeparator" parent="MainLayout/LeftPanel/LeftVBox" unique_id=2142486834]
layout_mode = 2 layout_mode = 2
[node name="LoadoutSection" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox"] [node name="LoadoutSection" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox" unique_id=109456880]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 10 theme_override_constants/separation = 10
[node name="LoadoutTitle" type="Label" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection"] [node name="LoadoutTitle" type="Label" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection" unique_id=1249647867]
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(0.41568628, 0.6392157, 0.14117648, 1) theme_override_colors/font_color = Color(0.41568628, 0.6392157, 0.14117648, 1)
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
theme_override_font_sizes/font_size = 18 theme_override_font_sizes/font_size = 18
text = "DEFAULT CHARACTER (LOADOUT)" text = "DEFAULT CHARACTER (LOADOUT)"
[node name="LoadoutHint" type="Label" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection"] [node name="LoadoutHint" type="Label" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection" unique_id=1773015369]
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1) theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1)
theme_override_font_sizes/font_size = 11 theme_override_font_sizes/font_size = 11
text = "This character will be auto-selected when you join or create a room." text = "This character will be auto-selected when you join or create a room."
autowrap_mode = 2 autowrap_mode = 2
[node name="CharacterSelector" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection"] [node name="CharacterSelector" type="HBoxContainer" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection" unique_id=1852188787]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 8 theme_override_constants/separation = 8
alignment = 1 alignment = 1
[node name="CharLeftBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection/CharacterSelector"] [node name="CharLeftBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection/CharacterSelector" unique_id=1225290843]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(44, 44) custom_minimum_size = Vector2(44, 44)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "◀" text = "◀"
[node name="LoadoutCharName" type="Label" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection/CharacterSelector"] [node name="LoadoutCharName" type="Label" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection/CharacterSelector" unique_id=1258961866]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(120, 44) custom_minimum_size = Vector2(120, 44)
layout_mode = 2 layout_mode = 2
@@ -180,139 +178,141 @@ text = "Copper"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="CharRightBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection/CharacterSelector"] [node name="CharRightBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection/CharacterSelector" unique_id=320910811]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(44, 44) custom_minimum_size = Vector2(44, 44)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "▶" text = "▶"
[node name="SetDefaultBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection"] [node name="SetDefaultBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/LoadoutSection" unique_id=1404065032]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(0, 44) custom_minimum_size = Vector2(0, 44)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "✓ SET AS DEFAULT" text = "✓ SET AS DEFAULT"
[node name="Separator2" type="HSeparator" parent="MainLayout/LeftPanel/LeftVBox"] [node name="Separator2" type="HSeparator" parent="MainLayout/LeftPanel/LeftVBox" unique_id=565201523]
layout_mode = 2 layout_mode = 2
[node name="StatsSection" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox"] [node name="StatsSection" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox" unique_id=1747237537]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 6 theme_override_constants/separation = 6
[node name="StatsTitle" type="Label" parent="MainLayout/LeftPanel/LeftVBox/StatsSection"] [node name="StatsTitle" type="Label" parent="MainLayout/LeftPanel/LeftVBox/StatsSection" unique_id=1171799022]
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(0.41568628, 0.6392157, 0.14117648, 1) theme_override_colors/font_color = Color(0.41568628, 0.6392157, 0.14117648, 1)
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
theme_override_font_sizes/font_size = 16 theme_override_font_sizes/font_size = 16
text = "Statistics" text = "Statistics"
[node name="GamesPlayed" type="Label" parent="MainLayout/LeftPanel/LeftVBox/StatsSection"] [node name="GamesPlayed" type="Label" parent="MainLayout/LeftPanel/LeftVBox/StatsSection" unique_id=440203237]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(0.57, 0.32090998, 0.1767, 1) theme_override_colors/font_color = Color(0.57, 0.32090998, 0.1767, 1)
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "Games Played: 0" text = "Games Played: 0"
[node name="WinRate" type="Label" parent="MainLayout/LeftPanel/LeftVBox/StatsSection"] [node name="WinRate" type="Label" parent="MainLayout/LeftPanel/LeftVBox/StatsSection" unique_id=1940835558]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(0.57, 0.32090998, 0.1767, 1) theme_override_colors/font_color = Color(0.57, 0.32090998, 0.1767, 1)
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "Win Rate: 0%" text = "Win Rate: 0%"
[node name="HighScore" type="Label" parent="MainLayout/LeftPanel/LeftVBox/StatsSection"] [node name="HighScore" type="Label" parent="MainLayout/LeftPanel/LeftVBox/StatsSection" unique_id=12845342]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
theme_override_colors/font_color = Color(0.57, 0.32090998, 0.1767, 1) theme_override_colors/font_color = Color(0.57, 0.32090998, 0.1767, 1)
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "High Score: 0" text = "High Score: 0"
[node name="AccountSection" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox"] [node name="AccountSection" type="VBoxContainer" parent="MainLayout/LeftPanel/LeftVBox" unique_id=1730058560]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 8 theme_override_constants/separation = 8
[node name="LinkAccountBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/AccountSection"] [node name="LinkAccountBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/AccountSection" unique_id=1126355767]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(0, 44) custom_minimum_size = Vector2(0, 44)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "Link Email (Keep Progress)" text = "Link Email (Keep Progress)"
[node name="LogoutBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/AccountSection"] [node name="LogoutBtn" type="Button" parent="MainLayout/LeftPanel/LeftVBox/AccountSection" unique_id=1741557407]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(0, 44) custom_minimum_size = Vector2(0, 44)
layout_mode = 2 layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6") theme_override_fonts/font = ExtResource("3_e13i6")
text = "Logout" text = "Logout"
[node name="StatusLabel" type="Label" parent="MainLayout/LeftPanel/LeftVBox"] [node name="StatusLabel" type="Label" parent="MainLayout/LeftPanel/LeftVBox" unique_id=188332146]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 12 theme_override_font_sizes/font_size = 12
horizontal_alignment = 1 horizontal_alignment = 1
[node name="RightPanel" type="SubViewportContainer" parent="MainLayout"] [node name="RightPanel" type="SubViewportContainer" parent="MainLayout" unique_id=2313053]
custom_minimum_size = Vector2(400, 0)
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_stretch_ratio = 1.2 size_flags_stretch_ratio = 1.2
custom_minimum_size = Vector2(400, 0)
stretch = true stretch = true
[node name="PreviewViewport" type="SubViewport" parent="MainLayout/RightPanel"] [node name="PreviewViewport" type="SubViewport" parent="MainLayout/RightPanel" unique_id=2118325644]
unique_name_in_owner = true unique_name_in_owner = true
transparent_bg = true transparent_bg = true
size = Vector2i(600, 720) handle_input_locally = false
size = Vector2i(746, 742)
render_target_update_mode = 4
[node name="WorldEnvironment" type="WorldEnvironment" parent="MainLayout/RightPanel/PreviewViewport"] [node name="WorldEnvironment" type="WorldEnvironment" parent="MainLayout/RightPanel/PreviewViewport" unique_id=1213356390]
environment = SubResource("Environment_preview") environment = SubResource("Environment_preview")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="MainLayout/RightPanel/PreviewViewport"] [node name="DirectionalLight3D" type="DirectionalLight3D" parent="MainLayout/RightPanel/PreviewViewport" unique_id=524977852]
transform = Transform3D(0.866025, -0.25, 0.433013, 0, 0.866025, 0.5, -0.5, -0.433013, 0.75, 0, 4, 0) transform = Transform3D(0.866025, -0.25, 0.433013, 0, 0.866025, 0.5, -0.5, -0.433013, 0.75, 0, 4, 0)
light_energy = 1.4 light_energy = 1.4
[node name="FillLight" type="OmniLight3D" parent="MainLayout/RightPanel/PreviewViewport"] [node name="FillLight" type="OmniLight3D" parent="MainLayout/RightPanel/PreviewViewport" unique_id=1512907756]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 2, 2) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 2, 2)
light_color = Color(0.5, 0.6, 1.0, 1) light_color = Color(0.5, 0.6, 1, 1)
light_energy = 0.5 light_energy = 0.5
omni_range = 8.0 omni_range = 8.0
[node name="Camera3D" type="Camera3D" parent="MainLayout/RightPanel/PreviewViewport"] [node name="Camera3D" type="Camera3D" parent="MainLayout/RightPanel/PreviewViewport" unique_id=1682800090]
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, 1.6, 3.2) transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, 1.6, 3.2)
current = true current = true
fov = 40.0 fov = 40.0
[node name="CharacterRoot" type="Node3D" parent="MainLayout/RightPanel/PreviewViewport"] [node name="CharacterRoot" type="Node3D" parent="MainLayout/RightPanel/PreviewViewport" unique_id=687534677]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(0.6587157, 0, 0.75239193, 0, 1, 0, -0.75239193, 0, 0.6587157, 0, 0.7540468, 0)
[node name="Masbro" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" instance=ExtResource("4_masbro")] [node name="Masbro" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" unique_id=48482236 instance=ExtResource("4_masbro")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
visible = false visible = false
[node name="Bob" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" instance=ExtResource("4_bob")] [node name="Bob" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" unique_id=1951694644 instance=ExtResource("4_bob")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.484627, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.484627, 0)
visible = false visible = false
[node name="Gatot" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" instance=ExtResource("4_gatot")] [node name="Gatot" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" unique_id=1852101135 instance=ExtResource("4_gatot")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
visible = false visible = false
[node name="Oldpop" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" instance=ExtResource("4_oldpop")] [node name="Oldpop" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" unique_id=812849337 instance=ExtResource("4_oldpop")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
[node name="AnimationPlayer" type="AnimationPlayer" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot"] [node name="AnimationPlayer" type="AnimationPlayer" parent="MainLayout/RightPanel/PreviewViewport/CharacterRoot" unique_id=4187871]
root_node = NodePath("../Oldpop") root_node = NodePath("../Oldpop")
libraries/animation-pack = ExtResource("5_animlib") libraries/animation-pack = ExtResource("5_animlib")
current_animation = "animation-pack/idle" autoplay = &"animation-pack/idle"
autoplay = "animation-pack/idle"
[node name="AvatarSelectionPopup" type="PopupPanel" parent="."] [node name="AvatarSelectionPopup" type="PopupPanel" parent="." unique_id=1186892858]
unique_name_in_owner = true unique_name_in_owner = true
title = "Select Avatar" title = "Select Avatar"
size = Vector2i(320, 220) size = Vector2i(320, 220)
[node name="GridContainer" type="GridContainer" parent="AvatarSelectionPopup"] [node name="GridContainer" type="GridContainer" parent="AvatarSelectionPopup" unique_id=1871925487]
unique_name_in_owner = true unique_name_in_owner = true
offset_left = 4.0 offset_left = 4.0
offset_top = 4.0 offset_top = 4.0
+7 -5
View File
@@ -846,23 +846,25 @@ func _on_server_disconnected() -> void:
func reset_rematch_votes() -> void: func reset_rematch_votes() -> void:
rematch_votes.clear() rematch_votes.clear()
emit_signal("rematch_votes_updated", 0, 2) var required = max(1, ceili(players_in_room.size() / 2.0))
emit_signal("rematch_votes_updated", 0, required)
@rpc("any_peer", "call_local", "reliable") @rpc("any_peer", "call_local", "reliable")
func request_rematch(player_id: int) -> void: func request_rematch(player_id: int) -> void:
"""Client requests a rematch. Only 2 votes needed to trigger.""" """Client requests a rematch. Votes needed depend on connected real players."""
if not multiplayer.is_server(): if not multiplayer.is_server():
return return
if player_id not in rematch_votes: if player_id not in rematch_votes:
rematch_votes.append(player_id) rematch_votes.append(player_id)
print("[LobbyManager] Rematch vote from %d. Total: %d/2" % [player_id, rematch_votes.size()]) var required = max(1, ceili(players_in_room.size() / 2.0))
print("[LobbyManager] Rematch vote from %d. Total: %d/%d" % [player_id, rematch_votes.size(), required])
# Sync vote count to all clients # Sync vote count to all clients
rpc("sync_rematch_votes", rematch_votes.size(), 2) rpc("sync_rematch_votes", rematch_votes.size(), required)
# Check if we have enough votes # Check if we have enough votes
if rematch_votes.size() >= 2: if rematch_votes.size() >= required:
print("[LobbyManager] Rematch threshold met! Starting game...") print("[LobbyManager] Rematch threshold met! Starting game...")
start_rematch() start_rematch()