Added Multiplayer Support
This commit is contained in:
parent
beb2b93613
commit
09c345785c
11 changed files with 338 additions and 46 deletions
60
menus/create.tscn
Normal file
60
menus/create.tscn
Normal file
|
@ -0,0 +1,60 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bl6wir1clomvu"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/create.gd" id="1_ewomb"]
|
||||
|
||||
[node name="create" 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_ewomb")
|
||||
|
||||
[node name="player_list" type="VBoxContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="list" type="Label" parent="player_list"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
|
||||
[node name="player_customization" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -128.0
|
||||
offset_top = -32.0
|
||||
offset_right = 128.0
|
||||
offset_bottom = 32.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="name" type="TextEdit" parent="player_customization"]
|
||||
custom_minimum_size = Vector2(256, 64)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
placeholder_text = "Name"
|
||||
|
||||
[node name="start" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -184.0
|
||||
offset_top = -53.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="start" type="Button" parent="start"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Start Game"
|
||||
|
||||
[connection signal="pressed" from="start/start" to="." method="_on_start_pressed"]
|
49
menus/join.tscn
Normal file
49
menus/join.tscn
Normal file
|
@ -0,0 +1,49 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bh1ptr4bepla6"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/join.gd" id="1_evkiv"]
|
||||
|
||||
[node name="Join" 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_evkiv")
|
||||
|
||||
[node name="player_customization" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -128.0
|
||||
offset_top = -32.0
|
||||
offset_right = 128.0
|
||||
offset_bottom = 32.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="name" type="TextEdit" parent="player_customization"]
|
||||
custom_minimum_size = Vector2(256, 64)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
placeholder_text = "Name"
|
||||
|
||||
[node name="ip" type="TextEdit" parent="player_customization"]
|
||||
custom_minimum_size = Vector2(256, 64)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
placeholder_text = "IP Address"
|
||||
|
||||
[node name="join" type="Button" parent="player_customization"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Join Game"
|
||||
|
||||
[node name="Timer" type="Timer" parent="player_customization"]
|
||||
one_shot = true
|
||||
|
||||
[connection signal="pressed" from="player_customization/join" to="." method="_on_join_pressed"]
|
||||
[connection signal="timeout" from="player_customization/Timer" to="." method="_on_timer_timeout"]
|
65
menus/main_menu.tscn
Normal file
65
menus/main_menu.tscn
Normal file
|
@ -0,0 +1,65 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://csemv5nsltino"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/main_menu.gd" id="1_hvi3a"]
|
||||
|
||||
[node name="main_menu" 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_hvi3a")
|
||||
|
||||
[node name="main_content" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -179.0
|
||||
offset_top = -123.0
|
||||
offset_right = 179.0
|
||||
offset_bottom = 123.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="Label" type="Label" parent="main_content"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 96
|
||||
text = "FreeFTF"
|
||||
|
||||
[node name="create" type="Button" parent="main_content"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Create Lobby"
|
||||
|
||||
[node name="join" type="Button" parent="main_content"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Join Lobby"
|
||||
|
||||
[node name="ver_string" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -40.0
|
||||
offset_top = -40.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="Label" type="Label" parent="ver_string"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Milestone 1"
|
||||
|
||||
[connection signal="pressed" from="main_content/create" to="." method="_on_create_pressed"]
|
||||
[connection signal="pressed" from="main_content/join" to="." method="_on_join_pressed"]
|
Loading…
Add table
Add a link
Reference in a new issue