Files
godot-multiplayer-demo/MainScene.tscn
2026-02-16 14:25:33 +01:00

109 lines
4.1 KiB
Plaintext

[gd_scene format=3 uid="uid://d0cdnl2m2h2ub"]
[ext_resource type="Script" uid="uid://dab50n01raf5a" path="res://main.gd" id="1_3mqji"]
[ext_resource type="PackedScene" uid="uid://dmkufuydplu0c" path="res://Player.tscn" id="2_x4av3"]
[ext_resource type="PackedScene" uid="uid://b82x5u0b3cpwv" path="res://lobbyListItem.tscn" id="3_rpqi1"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_uxrcv"]
bg_color = Color(0.17641908, 0.17641911, 0.17641899, 1)
[sub_resource type="BoxShape3D" id="BoxShape3D_x4av3"]
size = Vector3(100, 0.2, 100)
[sub_resource type="BoxMesh" id="BoxMesh_rpqi1"]
size = Vector3(100, 0.2, 100)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_uxrcv"]
albedo_color = Color(0.22670749, 0.22670749, 0.22670746, 1)
[node name="Main" type="Node3D" unique_id=1379208683 node_paths=PackedStringArray("lobby_list")]
script = ExtResource("1_3mqji")
player_scene = ExtResource("2_x4av3")
lobby_list_item = ExtResource("3_rpqi1")
lobby_list = NodePath("UI/LobbyListSection/LobbyListScrollContainer/LobbyList")
[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="." unique_id=1659402982]
_spawnable_scenes = PackedStringArray("uid://dmkufuydplu0c")
spawn_path = NodePath("..")
[node name="UI" type="Control" parent="." unique_id=1161351898]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="HostJoinSection" type="Control" parent="UI" unique_id=1616716395]
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="HostButton" type="Button" parent="UI/HostJoinSection" unique_id=2090245336]
layout_mode = 0
offset_right = 246.0
offset_bottom = 137.0
text = "HOST"
[node name="JoinButton" type="Button" parent="UI/HostJoinSection" unique_id=1557404200]
layout_mode = 0
offset_top = 156.0
offset_right = 241.0
offset_bottom = 271.0
disabled = true
text = "JOIN"
[node name="LobbyIdPrompt" type="LineEdit" parent="UI/HostJoinSection" unique_id=1258785698]
layout_mode = 0
offset_left = 2.0
offset_top = 269.0
offset_right = 243.0
offset_bottom = 318.0
placeholder_text = "LOBBY ID"
[node name="LobbyListSection" type="Control" parent="UI" unique_id=1788551827]
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="ListLobbiesButton" type="Button" parent="UI/LobbyListSection" unique_id=1172260789]
layout_mode = 0
offset_left = 317.0
offset_top = 6.0
offset_right = 477.0
offset_bottom = 98.0
text = "List Lobbies"
[node name="LobbyListScrollContainer" type="ScrollContainer" parent="UI/LobbyListSection" unique_id=1433036296]
layout_mode = 0
offset_left = 256.0
offset_top = 109.0
offset_right = 543.0
offset_bottom = 437.0
theme_override_styles/panel = SubResource("StyleBoxFlat_uxrcv")
[node name="LobbyList" type="VBoxContainer" parent="UI/LobbyListSection/LobbyListScrollContainer" unique_id=330790523]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="World" type="Node3D" parent="." unique_id=2003993590]
[node name="StaticBody3D" type="StaticBody3D" parent="World" unique_id=1187840452]
[node name="CollisionShape3D" type="CollisionShape3D" parent="World/StaticBody3D" unique_id=448167956]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.29736328, 0)
shape = SubResource("BoxShape3D_x4av3")
[node name="MeshInstance3D" type="MeshInstance3D" parent="World/StaticBody3D" unique_id=1016103612]
mesh = SubResource("BoxMesh_rpqi1")
surface_material_override/0 = SubResource("StandardMaterial3D_uxrcv")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="World" unique_id=2131172420]
transform = Transform3D(1, 0, 0, 0, 0.10017079, 0.9949703, 0, -0.9949703, 0.10017079, 0, 50, 0)
[connection signal="pressed" from="UI/HostJoinSection/HostButton" to="." method="_on_button_pressed"]
[connection signal="pressed" from="UI/HostJoinSection/JoinButton" to="." method="_on_join_button_pressed"]
[connection signal="text_changed" from="UI/HostJoinSection/LobbyIdPrompt" to="." method="_on_lobby_id_text_changed"]
[connection signal="pressed" from="UI/LobbyListSection/ListLobbiesButton" to="." method="_on_list_lobbies_button_pressed"]