multiplayer

This commit is contained in:
Rendo 2025-11-22 01:07:18 +05:00
commit 0dc6247f91
22 changed files with 298 additions and 14 deletions

60
scenes/main_menu.tscn Normal file
View file

@ -0,0 +1,60 @@
[gd_scene load_steps=4 format=3 uid="uid://cbtp4rvg66ba1"]
[ext_resource type="Script" uid="uid://bsyuos803g7qf" path="res://scripts/gui/main_menu_gui.gd" id="1_l6cm7"]
[ext_resource type="Script" uid="uid://cl3hhmw5666sj" path="res://scripts/gui/lobby/players_display.gd" id="2_ekxnf"]
[ext_resource type="Script" uid="uid://2uyxkfmbbims" path="res://scripts/gui/lobby/lobby_buttons.gd" id="3_bqqt6"]
[node name="MainMenu" 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_l6cm7")
[node name="MainMenu" type="PanelContainer" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="VBoxContainer" type="VBoxContainer" parent="MainMenu"]
layout_mode = 2
[node name="HostButton" type="Button" parent="MainMenu/VBoxContainer"]
layout_mode = 2
text = "HOST"
[node name="ConnectButton" type="Button" parent="MainMenu/VBoxContainer"]
layout_mode = 2
text = "CONNECT"
[node name="Lobby" type="PanelContainer" parent="."]
visible = false
layout_mode = 0
offset_right = 305.0
offset_bottom = 242.0
[node name="VBoxContainer" type="VBoxContainer" parent="Lobby"]
layout_mode = 2
[node name="Players" type="HBoxContainer" parent="Lobby/VBoxContainer"]
layout_mode = 2
script = ExtResource("2_ekxnf")
[node name="Buttons" type="HBoxContainer" parent="Lobby/VBoxContainer"]
layout_mode = 2
script = ExtResource("3_bqqt6")
[node name="LeaveButton" type="Button" parent="Lobby/VBoxContainer/Buttons"]
layout_mode = 2
text = "Leave"
[node name="StartButton" type="Button" parent="Lobby/VBoxContainer/Buttons"]
layout_mode = 2
text = "Start"
[connection signal="pressed" from="MainMenu/VBoxContainer/HostButton" to="." method="_on_host_button_pressed"]
[connection signal="pressed" from="MainMenu/VBoxContainer/ConnectButton" to="." method="_on_connect_button_pressed"]
[connection signal="pressed" from="Lobby/VBoxContainer/Buttons/LeaveButton" to="Lobby/VBoxContainer/Buttons" method="_on_leave_button_pressed"]
[connection signal="pressed" from="Lobby/VBoxContainer/Buttons/StartButton" to="Lobby/VBoxContainer/Buttons" method="_on_start_button_pressed"]