Restructured project files
This commit is contained in:
@@ -252,7 +252,7 @@ func _notify_raid_start() -> void:
|
||||
print("[NetworkManager] _notify_raid_start received on peer_id=%d" % multiplayer.get_unique_id())
|
||||
GameState.current_phase = GameState.Phase.IN_RAID
|
||||
raid_starting.emit()
|
||||
var err: Error = get_tree().change_scene_to_file("res://scenes/raid/raid.tscn")
|
||||
var err: Error = get_tree().change_scene_to_file("res://stages/raid/raid.tscn")
|
||||
if err != OK:
|
||||
push_error("Failed to change scene: %s" % error_string(err))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://c7h1s4t8rbna"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ekpgs2y3erha" path="res://src/environment/water_body.gd" id="1_wb"]
|
||||
[ext_resource type="Script" uid="uid://ekpgs2y3erha" path="res://common/environment/water_body.gd" id="1_wb"]
|
||||
[ext_resource type="Shader" uid="uid://djqkodwuecmvn" path="res://assets/shaders/water_surface.gdshader" id="2_ws"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_wb"]
|
||||
13
common/resources/movement_profile/vacuum_profile.tres
Normal file
13
common/resources/movement_profile/vacuum_profile.tres
Normal file
@@ -0,0 +1,13 @@
|
||||
[gd_resource type="Resource" script_class="MovementProfile" format=3 uid="uid://botk6re17nq57"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cvbxpg2vxgr7v" path="res://common/resources/movement_profile/movement_profile.gd" id="1_vac"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_vac")
|
||||
max_speed = 30.0
|
||||
acceleration = 40.0
|
||||
brake_deceleration = 50.0
|
||||
strafe_speed = 20.0
|
||||
friction = 12.0
|
||||
max_turn_rate = 12.0
|
||||
boost_enabled = true
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="Resource" script_class="MovementProfile" load_steps=2 format=3 uid="uid://cmw9ptf2n8r1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://brx7k4mj5vp9" path="res://src/resources/movement_profile.gd" id="1_vac"]
|
||||
[ext_resource type="Script" uid="uid://cvbxpg2vxgr7v" path="res://common/resources/movement_profile/movement_profile.gd" id="1_vac"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_vac")
|
||||
93
entities/player/ship/player_ship.tscn
Normal file
93
entities/player/ship/player_ship.tscn
Normal file
@@ -0,0 +1,93 @@
|
||||
[gd_scene format=3 uid="uid://b77fdan4fphw1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b83vmbx10mlqe" path="res://entities/player/ship/ship_controller.gd" id="1_bp5fn"]
|
||||
[ext_resource type="Resource" uid="uid://botk6re17nq57" path="res://common/resources/movement_profile/vacuum_profile.tres" id="2_iolly"]
|
||||
[ext_resource type="Resource" uid="uid://cmxaptf2n8r1" path="res://common/resources/movement_profile/water_profile.tres" id="3_0eqv4"]
|
||||
[ext_resource type="Script" uid="uid://c3bmqpf7an3fu" path="res://common/components/medium_detector.gd" id="4_ejd1r"]
|
||||
[ext_resource type="PackedScene" uid="uid://u5uq3pwevo6r" path="res://assets/models/prototypes/craft_speederA.glb" id="4_iolly"]
|
||||
[ext_resource type="Script" uid="uid://clpmdcp1t5ipf" path="res://common/components/input/local_player_input.gd" id="5_1cba8"]
|
||||
[ext_resource type="Script" uid="uid://b1ta13rilevba" path="res://common/components/movement/boost_component.gd" id="6_5tbgv"]
|
||||
[ext_resource type="Script" uid="uid://41m6sjc4myd4" path="res://common/components/movement/movement_component.gd" id="7_8t88g"]
|
||||
[ext_resource type="Script" uid="uid://cdue333yndxup" path="res://common/components/movement/visual_tilt_component.gd" id="8_xl1ul"]
|
||||
[ext_resource type="Script" uid="uid://1vyqg3yduuwv" path="res://common/components/network/net_transform_sync.gd" id="9_ka5qk"]
|
||||
[ext_resource type="Script" uid="uid://drq7ujri6x2cn" path="res://common/components/combat/weapon_component.gd" id="10_b1agc"]
|
||||
[ext_resource type="PackedScene" uid="uid://iogkdi8dv0nv" path="res://entities/projectile/projectile.tscn" id="11_gkf36"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_body"]
|
||||
albedo_color = Color(0.8117647, 0.3254902, 0, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_body"]
|
||||
material = SubResource("StandardMaterial3D_body")
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_iolly"]
|
||||
radius = 0.7592
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_sync"]
|
||||
properties/0/path = NodePath("NetTransformSync:_net_position")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 1
|
||||
properties/1/path = NodePath("NetTransformSync:_net_rotation")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 1
|
||||
|
||||
[node name="PlayerShip" type="CharacterBody3D" unique_id=489933511 node_paths=PackedStringArray("input_source", "ship_model")]
|
||||
script = ExtResource("1_bp5fn")
|
||||
vacuum_profile = ExtResource("2_iolly")
|
||||
water_profile = ExtResource("3_0eqv4")
|
||||
input_source = NodePath("LocalPlayerInput")
|
||||
ship_model = NodePath("ModelRoot")
|
||||
|
||||
[node name="ModelRoot" type="Node3D" parent="." unique_id=34595022]
|
||||
|
||||
[node name="craft_speederA" parent="ModelRoot" unique_id=1872867361 instance=ExtResource("4_iolly")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, -0.145, -2.073905)
|
||||
|
||||
[node name="ShipModel" type="MeshInstance3D" parent="ModelRoot" unique_id=1350004817]
|
||||
mesh = SubResource("BoxMesh_body")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="Muzzle" type="Marker3D" parent="." unique_id=1611541809]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.1504534)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1270027305]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.002456665, 0.19464111, -0.42757562)
|
||||
shape = SubResource("SphereShape3D_iolly")
|
||||
|
||||
[node name="MediumDetector" type="Node" parent="." unique_id=598570899]
|
||||
script = ExtResource("4_ejd1r")
|
||||
|
||||
[node name="LocalPlayerInput" type="Node" parent="." unique_id=1207680130]
|
||||
script = ExtResource("5_1cba8")
|
||||
|
||||
[node name="BoostComponent" type="Node" parent="." unique_id=509961229 node_paths=PackedStringArray("input_source")]
|
||||
script = ExtResource("6_5tbgv")
|
||||
input_source = NodePath("../LocalPlayerInput")
|
||||
|
||||
[node name="MovementComponent" type="Node" parent="." unique_id=908019019 node_paths=PackedStringArray("body", "input_source", "boost")]
|
||||
script = ExtResource("7_8t88g")
|
||||
body = NodePath("..")
|
||||
input_source = NodePath("../LocalPlayerInput")
|
||||
boost = NodePath("../BoostComponent")
|
||||
vacuum_profile = ExtResource("2_iolly")
|
||||
water_profile = ExtResource("3_0eqv4")
|
||||
|
||||
[node name="VisualTiltComponent" type="Node" parent="." unique_id=316210584 node_paths=PackedStringArray("ship_model", "input_source", "boost")]
|
||||
script = ExtResource("8_xl1ul")
|
||||
ship_model = NodePath("../ModelRoot")
|
||||
input_source = NodePath("../LocalPlayerInput")
|
||||
boost = NodePath("../BoostComponent")
|
||||
|
||||
[node name="NetTransformSync" type="Node" parent="." unique_id=1863400262 node_paths=PackedStringArray("body")]
|
||||
script = ExtResource("9_ka5qk")
|
||||
body = NodePath("..")
|
||||
|
||||
[node name="WeaponComponent" type="Node" parent="." unique_id=765058068 node_paths=PackedStringArray("input_source", "muzzle")]
|
||||
script = ExtResource("10_b1agc")
|
||||
input_source = NodePath("../LocalPlayerInput")
|
||||
projectile_scene = ExtResource("11_gkf36")
|
||||
muzzle = NodePath("../Muzzle")
|
||||
|
||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="." unique_id=809470891]
|
||||
replication_interval = 0.05
|
||||
delta_interval = 0.05
|
||||
replication_config = SubResource("SceneReplicationConfig_sync")
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://iogkdi8dv0nv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cpqdkciafcu51" path="res://src/ship/projectile.gd" id="1_a85iw"]
|
||||
[ext_resource type="Script" uid="uid://cpqdkciafcu51" path="res://entities/projectile/projectile.gd" id="1_a85iw"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a85iw"]
|
||||
albedo_color = Color(0.41960785, 0, 0, 1)
|
||||
@@ -22,16 +22,17 @@ config/icon="res://icon.svg"
|
||||
[autoload]
|
||||
|
||||
Nakama="*uid://dpwa6ykdkxalb"
|
||||
GameState="*res://src/autoload/game_state.gd"
|
||||
NetworkManager="*res://src/autoload/network_manager.gd"
|
||||
GameState="*res://common/autoload/game_state.gd"
|
||||
NetworkManager="*res://common/autoload/network_manager.gd"
|
||||
|
||||
[file_customization]
|
||||
|
||||
folder_colors={
|
||||
"res://addons/": "gray",
|
||||
"res://assets/": "red",
|
||||
"res://scenes/": "green",
|
||||
"res://src/": "blue"
|
||||
"res://common/": "orange",
|
||||
"res://entities/": "yellow",
|
||||
"res://stages/": "green"
|
||||
}
|
||||
|
||||
[input]
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://b77fdan4fphw1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b83vmbx10mlqe" path="res://src/ship/ship_controller.gd" id="1_sc"]
|
||||
[ext_resource type="Resource" uid="uid://dv83nqxw14kl" path="res://src/resources/vacuum_profile.tres" id="2_aej3c"]
|
||||
[ext_resource type="Script" uid="uid://c3bmqpf7an3fu" path="res://src/components/medium_detector.gd" id="3_md"]
|
||||
[ext_resource type="Resource" uid="uid://cmxaptf2n8r1" path="res://src/resources/water_profile.tres" id="3_pyjud"]
|
||||
[ext_resource type="PackedScene" uid="uid://iogkdi8dv0nv" path="res://scenes/projectile.tscn" id="4_a1vlj"]
|
||||
[ext_resource type="Script" uid="uid://clpmdcp1t5ipf" path="res://src/components/local_player_input.gd" id="6_lpi"]
|
||||
[ext_resource type="Script" path="res://src/components/weapon_component.gd" id="7_weap"]
|
||||
[ext_resource type="Script" path="res://src/components/boost_component.gd" id="8_boost"]
|
||||
[ext_resource type="Script" path="res://src/components/movement_component.gd" id="9_mov"]
|
||||
[ext_resource type="Script" path="res://src/components/visual_tilt_component.gd" id="10_tilt"]
|
||||
[ext_resource type="Script" path="res://src/components/net_transform_sync.gd" id="11_nts"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_body"]
|
||||
albedo_color = Color(0.8117647, 0.3254902, 0, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_body"]
|
||||
material = SubResource("StandardMaterial3D_body")
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_body"]
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_sync"]
|
||||
properties/0/path = NodePath("NetTransformSync:_net_position")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 1
|
||||
properties/1/path = NodePath("NetTransformSync:_net_rotation")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 1
|
||||
|
||||
[node name="PlayerShip" type="CharacterBody3D" unique_id=489933511 node_paths=PackedStringArray("input_source", "ship_model")]
|
||||
script = ExtResource("1_sc")
|
||||
vacuum_profile = ExtResource("2_aej3c")
|
||||
water_profile = ExtResource("3_pyjud")
|
||||
input_source = NodePath("LocalPlayerInput")
|
||||
ship_model = NodePath("ShipModel")
|
||||
|
||||
[node name="ShipModel" type="MeshInstance3D" parent="." unique_id=1742449262]
|
||||
mesh = SubResource("BoxMesh_body")
|
||||
|
||||
[node name="Muzzle" type="Marker3D" parent="." unique_id=1611541809]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.1504534)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1270027305]
|
||||
shape = SubResource("BoxShape3D_body")
|
||||
|
||||
[node name="MediumDetector" type="Node" parent="." unique_id=598570899]
|
||||
script = ExtResource("3_md")
|
||||
|
||||
[node name="LocalPlayerInput" type="Node" parent="." unique_id=1207680130]
|
||||
script = ExtResource("6_lpi")
|
||||
|
||||
[node name="BoostComponent" type="Node" parent="." node_paths=PackedStringArray("input_source")]
|
||||
script = ExtResource("8_boost")
|
||||
input_source = NodePath("../LocalPlayerInput")
|
||||
|
||||
[node name="MovementComponent" type="Node" parent="." node_paths=PackedStringArray("body", "input_source", "boost")]
|
||||
script = ExtResource("9_mov")
|
||||
body = NodePath("..")
|
||||
input_source = NodePath("../LocalPlayerInput")
|
||||
boost = NodePath("../BoostComponent")
|
||||
vacuum_profile = ExtResource("2_aej3c")
|
||||
water_profile = ExtResource("3_pyjud")
|
||||
|
||||
[node name="VisualTiltComponent" type="Node" parent="." node_paths=PackedStringArray("ship_model", "input_source", "boost")]
|
||||
script = ExtResource("10_tilt")
|
||||
ship_model = NodePath("../ShipModel")
|
||||
input_source = NodePath("../LocalPlayerInput")
|
||||
boost = NodePath("../BoostComponent")
|
||||
|
||||
[node name="NetTransformSync" type="Node" parent="." node_paths=PackedStringArray("body")]
|
||||
script = ExtResource("11_nts")
|
||||
body = NodePath("..")
|
||||
|
||||
[node name="WeaponComponent" type="Node" parent="." node_paths=PackedStringArray("input_source", "muzzle")]
|
||||
script = ExtResource("7_weap")
|
||||
input_source = NodePath("../LocalPlayerInput")
|
||||
projectile_scene = ExtResource("4_a1vlj")
|
||||
muzzle = NodePath("../Muzzle")
|
||||
|
||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="." unique_id=809470891]
|
||||
replication_interval = 0.05
|
||||
delta_interval = 0.05
|
||||
replication_config = SubResource("SceneReplicationConfig_sync")
|
||||
@@ -1,13 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="MovementProfile" load_steps=2 format=3 uid="uid://dv83nqxw14kl"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://brx7k4mj5vp9" path="res://src/resources/movement_profile.gd" id="1_vac"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_vac")
|
||||
max_speed = 30.0
|
||||
acceleration = 40.0
|
||||
brake_deceleration = 50.0
|
||||
strafe_speed = 20.0
|
||||
friction = 12.0
|
||||
max_turn_rate = 12.0
|
||||
boost_enabled = true
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://lobbyscene01"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c2e2hr52twq1g" path="res://src/ui/lobby.gd" id="1_lobby"]
|
||||
[ext_resource type="Script" uid="uid://c2e2hr52twq1g" path="res://stages/lobby/lobby.gd" id="1_i4flk"]
|
||||
|
||||
[node name="Lobby" type="Control" unique_id=806926705]
|
||||
layout_mode = 3
|
||||
@@ -9,7 +9,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_lobby")
|
||||
script = ExtResource("1_i4flk")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1444189391]
|
||||
layout_mode = 1
|
||||
@@ -1,9 +1,9 @@
|
||||
[gd_scene format=3 uid="uid://biwfc6l2lnu11"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://inqwtwfui2tr" path="res://src/ship/ship_camera.gd" id="1_cam"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7h1s4t8rbna" path="res://scenes/environment/water_body.tscn" id="2_wb"]
|
||||
[ext_resource type="Script" uid="uid://duaellwy47x8k" path="res://src/environment/underwater_effect.gd" id="3_ue"]
|
||||
[ext_resource type="Script" uid="uid://dwxwf5tf35pc3" path="res://src/raid/raid_scene.gd" id="4_raid"]
|
||||
[ext_resource type="Script" uid="uid://inqwtwfui2tr" path="res://entities/player/ship/ship_camera.gd" id="1_cam"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7h1s4t8rbna" path="res://common/environment/water_body.tscn" id="2_wb"]
|
||||
[ext_resource type="Script" uid="uid://duaellwy47x8k" path="res://common/environment/underwater_effect.gd" id="3_ue"]
|
||||
[ext_resource type="Script" uid="uid://dwxwf5tf35pc3" path="res://stages/raid/raid_scene.gd" id="4_raid"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_sky"]
|
||||
|
||||
@@ -34,13 +34,11 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 0, 0)
|
||||
[node name="Ships" type="Node3D" parent="." unique_id=933208242]
|
||||
|
||||
[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="." unique_id=1309733131]
|
||||
_spawnable_scenes = PackedStringArray("uid://b77fdan4fphw1")
|
||||
spawn_path = NodePath("../Ships")
|
||||
|
||||
[node name="Projectiles" type="Node3D" parent="."]
|
||||
[node name="Projectiles" type="Node3D" parent="." unique_id=14611836]
|
||||
|
||||
[node name="ProjectileSpawner" type="MultiplayerSpawner" parent="."]
|
||||
_spawnable_scenes = PackedStringArray("uid://iogkdi8dv0nv")
|
||||
[node name="ProjectileSpawner" type="MultiplayerSpawner" parent="." unique_id=39880195]
|
||||
spawn_path = NodePath("../Projectiles")
|
||||
|
||||
[node name="CameraRig" type="Node3D" parent="." unique_id=2104412587]
|
||||
@@ -4,8 +4,8 @@
|
||||
class_name RaidScene
|
||||
extends Node3D
|
||||
|
||||
const PLAYER_SHIP_SCENE: PackedScene = preload("res://scenes/ship/player_ship.tscn")
|
||||
const PROJECTILE_SCENE: PackedScene = preload("res://scenes/projectile.tscn")
|
||||
const PLAYER_SHIP_SCENE: PackedScene = preload("res://entities/player/ship/player_ship.tscn")
|
||||
const PROJECTILE_SCENE: PackedScene = preload("res://entities/projectile/projectile.tscn")
|
||||
|
||||
@export var spawn_points: Array[NodePath] = []
|
||||
|
||||
Reference in New Issue
Block a user