This commit is contained in:
Patrick 2025-07-31 13:57:50 +02:00
parent fadea22b9d
commit d72b5ac57b
14 changed files with 184 additions and 5 deletions

View file

@ -1,5 +1,5 @@
class_name HostGame
extends Control
extends JoinGame
func _on_start_game_button_pressed() -> void:
Multiplayer.switch_scene.rpc("res://maps/test_map.tscn")

View file

@ -26,4 +26,12 @@ grow_horizontal = 2
grow_vertical = 2
text = "Start Game"
[node name="PlayerList" type="Label" parent="."]
layout_mode = 1
anchors_preset = 9
anchor_bottom = 1.0
offset_right = 1.0
grow_vertical = 2
text = "1"
[connection signal="pressed" from="StartGameButton" to="." method="_on_start_game_button_pressed"]

5
ui/join_game.gd Normal file
View file

@ -0,0 +1,5 @@
class_name JoinGame
extends Control
func _ready() -> void:
Multiplayer.playerlist_label = $PlayerList

1
ui/join_game.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://b5gc2gq5adxsf

View file

@ -1,4 +1,6 @@
[gd_scene format=3 uid="uid://dpxam8lwgsd6q"]
[gd_scene load_steps=2 format=3 uid="uid://dpxam8lwgsd6q"]
[ext_resource type="Script" uid="uid://b5gc2gq5adxsf" path="res://ui/join_game.gd" id="1_ju2tq"]
[node name="JoinGame" type="Control"]
layout_mode = 3
@ -7,3 +9,11 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_ju2tq")
[node name="PlayerList" type="Label" parent="."]
layout_mode = 1
anchors_preset = 9
anchor_bottom = 1.0
offset_right = 1.0
grow_vertical = 2