multiplayer
This commit is contained in:
parent
aa35ee5975
commit
0dc6247f91
22 changed files with 298 additions and 14 deletions
60
scenes/main_menu.tscn
Normal file
60
scenes/main_menu.tscn
Normal 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"]
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://dpsr6ug3pkb40"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://dpsr6ug3pkb40"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3dphlay25fih" path="res://scripts/player/player.gd" id="1_g2els"]
|
||||
[ext_resource type="Script" uid="uid://dalwlndejfdhm" path="res://scripts/player/crosshair.gd" id="3_dqkch"]
|
||||
|
|
@ -95,6 +95,21 @@ _data = {
|
|||
}
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_g2els"]
|
||||
height = 1.2958984
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_qhqgy"]
|
||||
properties/0/path = NodePath(".:position")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 1
|
||||
properties/1/path = NodePath(".:rotation")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 1
|
||||
properties/2/path = NodePath("Camera3D:rotation")
|
||||
properties/2/spawn = true
|
||||
properties/2/replication_mode = 1
|
||||
properties/3/path = NodePath(".:crouched")
|
||||
properties/3/spawn = true
|
||||
properties/3/replication_mode = 1
|
||||
|
||||
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("animation_player", "stand_up_area")]
|
||||
collision_layer = 2
|
||||
|
|
@ -122,7 +137,7 @@ libraries = {
|
|||
collision_layer = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StandArea"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.3520508, 0)
|
||||
shape = SubResource("CapsuleShape3D_g2els")
|
||||
debug_color = Color(0.9878064, 0, 0.31407458, 0.41960785)
|
||||
debug_fill = false
|
||||
|
|
@ -152,3 +167,6 @@ script = ExtResource("3_dqkch")
|
|||
crosses_width = 2.0
|
||||
crosses_length = 6.0
|
||||
crosses_offset = 3.0
|
||||
|
||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
|
||||
replication_config = SubResource("SceneReplicationConfig_qhqgy")
|
||||
|
|
|
|||
|
|
@ -1,3 +1,49 @@
|
|||
[gd_scene format=3 uid="uid://cheu6vds21er7"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cheu6vds21er7"]
|
||||
|
||||
[node name="Smoke" type="RigidBody3D"]
|
||||
[ext_resource type="Script" uid="uid://t5jjqwnkxgvo" path="res://scripts/smoke_grenade.gd" id="1_acmqr"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_acmqr"]
|
||||
bounce = 0.5
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_vb5ru"]
|
||||
radius = 0.1
|
||||
height = 0.5
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_acmqr"]
|
||||
frequency = 0.1141
|
||||
|
||||
[sub_resource type="NoiseTexture3D" id="NoiseTexture3D_rx0m8"]
|
||||
width = 128
|
||||
height = 128
|
||||
depth = 128
|
||||
noise = SubResource("FastNoiseLite_acmqr")
|
||||
|
||||
[sub_resource type="FogMaterial" id="FogMaterial_rx0m8"]
|
||||
resource_local_to_scene = true
|
||||
density = 8.0
|
||||
density_texture = SubResource("NoiseTexture3D_rx0m8")
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_acmqr"]
|
||||
radius = 0.1
|
||||
height = 0.5
|
||||
|
||||
[node name="Smoke" type="RigidBody3D" node_paths=PackedStringArray("fog")]
|
||||
physics_material_override = SubResource("PhysicsMaterial_acmqr")
|
||||
contact_monitor = true
|
||||
max_contacts_reported = 1
|
||||
script = ExtResource("1_acmqr")
|
||||
radius = 10.0
|
||||
fog = NodePath("FogVolume")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("CapsuleMesh_vb5ru")
|
||||
|
||||
[node name="FogVolume" type="FogVolume" parent="."]
|
||||
size = Vector3(0, 0, 0)
|
||||
shape = 0
|
||||
material = SubResource("FogMaterial_rx0m8")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("CapsuleShape3D_acmqr")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue