Add multiplayer game mode over the network

This commit is contained in:
Squinternator 2024-04-07 21:03:56 +00:00
parent ecc195e38e
commit 35af9ecc2d
13 changed files with 278 additions and 81 deletions

View file

@ -1,11 +1,3 @@
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://de6t4olk7hrs1"]
[ext_resource type="Texture2D" uid="uid://cvtqt0k2ewd07" path="res://weapons/space_gun/assets/albedo.png" id="1_36iph"]
[ext_resource type="Shader" path="res://shaders/zclip.gdshader" id="1_c4uko"]
[gd_resource type="ShaderMaterial" format=3 uid="uid://de6t4olk7hrs1"]
[resource]
render_priority = 0
shader = ExtResource("1_c4uko")
shader_parameter/FOV = 70.0
shader_parameter/albedo = Color(1, 1, 1, 1)
shader_parameter/texture_albedo = ExtResource("1_36iph")

View file

@ -21,10 +21,10 @@ func print_node_properties(node):
func _ready():
shoot.connect(_on_shoot)
func _input(_event):
if Input.is_action_just_pressed("fire_primary"):
var projectile = PROJECTILE.instantiate()
shoot.emit(projectile, nozzle, inventory.owner)
func fire_primary():
var projectile = PROJECTILE.instantiate()
shoot.emit(projectile, nozzle, inventory.owner)
func _on_shoot(projectile, origin, player):
projectile.position = origin.global_position

View file

@ -1,16 +1,8 @@
[gd_scene load_steps=7 format=3 uid="uid://c8co0qa2omjmh"]
[gd_scene load_steps=5 format=3 uid="uid://c8co0qa2omjmh"]
[ext_resource type="Script" path="res://weapons/space_gun/space_gun.gd" id="1_6sm4s"]
[ext_resource type="Texture2D" uid="uid://cvtqt0k2ewd07" path="res://weapons/space_gun/assets/albedo.png" id="1_51bf5"]
[ext_resource type="Material" uid="uid://de6t4olk7hrs1" path="res://weapons/space_gun/assets/material.tres" id="1_uaehs"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ioife"]
resource_name = "dark"
albedo_color = Color(0, 0, 0, 1)
albedo_texture = ExtResource("1_51bf5")
metallic = 0.35
texture_filter = 1
[sub_resource type="ArrayMesh" id="ArrayMesh_2hpnh"]
_surfaces = [{
"aabb": AABB(-1.5172, -0.57, -4.4, 1.0692, 1.57, 4.6),
@ -55,7 +47,6 @@ _surfaces = [{
"format": 34896613399,
"index_count": 60,
"index_data": PackedByteArray(30, 4, 28, 4, 29, 4, 29, 4, 31, 4, 30, 4, 34, 4, 32, 4, 33, 4, 33, 4, 35, 4, 34, 4, 38, 4, 36, 4, 37, 4, 37, 4, 39, 4, 38, 4, 42, 4, 40, 4, 41, 4, 41, 4, 43, 4, 42, 4, 43, 4, 44, 4, 42, 4, 43, 4, 45, 4, 44, 4, 48, 4, 46, 4, 47, 4, 47, 4, 49, 4, 48, 4, 234, 3, 233, 3, 50, 4, 53, 4, 51, 4, 52, 4, 52, 4, 54, 4, 53, 4, 57, 4, 55, 4, 56, 4, 60, 4, 58, 4, 59, 4, 59, 4, 61, 4, 60, 4, 64, 4, 62, 4, 63, 4, 65, 4, 238, 3, 222, 3),
"material": SubResource("StandardMaterial3D_ioife"),
"name": "dark",
"primitive": 3,
"uv_scale": Vector4(8.8, 10.8, 0, 0),
@ -75,4 +66,4 @@ mesh = SubResource("ArrayMesh_hudfn")
skeleton = NodePath("")
[node name="Nozzle" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.225)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.315549)