✨ inventory and refactoring
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://blaieaqp413k7"]
|
||||
|
||||
[ext_resource type="Terrain3DStorage" uid="uid://dyon4xda4k40d" path="res://maps/genesis/resources/storage.res" id="1_8wr5r"]
|
||||
[ext_resource type="Terrain3DStorage" uid="uid://dyon4xda4k40d" path="res://src/maps/genesis/resources/storage.res" id="1_8wr5r"]
|
||||
[ext_resource type="Script" path="res://addons/terrain_3d/tools/importer.gd" id="1_60b8f"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_5sc5a"]
|
||||
|
|
|
|||
|
|
@ -1,326 +0,0 @@
|
|||
[gd_scene load_steps=41 format=3 uid="uid://cbhx1xme0sb7k"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/player/player.gd" id="1_mk68k"]
|
||||
[ext_resource type="PackedScene" uid="uid://drbefw6akui2v" path="res://entities/player/assets/vanguard.tscn" id="2_beyex"]
|
||||
[ext_resource type="Shape3D" uid="uid://cb8esdlnottdn" path="res://entities/player/collision_shape.tres" id="2_vjqny"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcv81ku26xo" path="res://interfaces/hud/hud.tscn" id="3_ccety"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8co0qa2omjmh" path="res://entities/weapons/space_gun/space_gun.tscn" id="4_6jh57"]
|
||||
[ext_resource type="Script" path="res://entities/components/match_participant_component.gd" id="6_lrose"]
|
||||
[ext_resource type="Script" path="res://entities/player/player_input.gd" id="6_ymcrr"]
|
||||
[ext_resource type="PackedScene" uid="uid://dsysi2rd3bu76" path="res://interfaces/hud/iffs/iff.tscn" id="7_8hc80"]
|
||||
[ext_resource type="Script" path="res://entities/components/flag_carry_component.gd" id="8_pdfbn"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3l7fvbdg6m5g" path="res://entities/flag/assets/flag.glb" id="9_fce2y"]
|
||||
[ext_resource type="Script" path="res://addons/smoothing/smoothing.gd" id="11_k330l"]
|
||||
[ext_resource type="Texture2D" uid="uid://ct1v5iadtpadm" path="res://entities/player/assets/jetpackfx/smoke_01.png" id="12_ypuho"]
|
||||
[ext_resource type="Texture2D" uid="uid://doxo4vfn0bjlp" path="res://entities/player/assets/jetpackfx/smoke_02.png" id="13_wvbf0"]
|
||||
[ext_resource type="Script" path="res://entities/components/health_component.gd" id="14_ctgxn"]
|
||||
[ext_resource type="Texture2D" uid="uid://dmf12llra7aq5" path="res://entities/player/assets/jetpackfx/Particle01.png" id="14_vughy"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_clur0"]
|
||||
resource_local_to_scene = true
|
||||
bounce = 1.0
|
||||
absorbent = true
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_hwe6e"]
|
||||
radius = 0.2
|
||||
|
||||
[sub_resource type="Animation" id="Animation_yqgrk"]
|
||||
resource_name = "death"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Smoothing/SpringArm3D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0.5, 0), Vector3(0, -0.114794, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Smoothing/SpringArm3D:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(-1.35254, 0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_hg307"]
|
||||
_data = {
|
||||
"death": SubResource("Animation_yqgrk")
|
||||
}
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_rqdp6"]
|
||||
properties/0/path = NodePath(".:linear_velocity")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 1
|
||||
properties/1/path = NodePath(".:position")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 1
|
||||
properties/2/path = NodePath("HealthComponent:health")
|
||||
properties/2/spawn = true
|
||||
properties/2/replication_mode = 2
|
||||
properties/3/path = NodePath(".:player_state")
|
||||
properties/3/spawn = true
|
||||
properties/3/replication_mode = 2
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_5j4ew"]
|
||||
properties/0/path = NodePath(".:direction")
|
||||
properties/0/spawn = false
|
||||
properties/0/replication_mode = 1
|
||||
properties/1/path = NodePath(".:jetting")
|
||||
properties/1/spawn = false
|
||||
properties/1/replication_mode = 2
|
||||
properties/2/path = NodePath(".:camera_rotation")
|
||||
properties/2/spawn = false
|
||||
properties/2/replication_mode = 1
|
||||
properties/3/path = NodePath(".:skiing")
|
||||
properties/3/spawn = false
|
||||
properties/3/replication_mode = 2
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_3u0pn"]
|
||||
offsets = PackedFloat32Array(0, 0.872727)
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_wjoiw"]
|
||||
gradient = SubResource("Gradient_3u0pn")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_pmb0n"]
|
||||
max_value = 2.0
|
||||
_data = [Vector2(0, 0.197802), 0.0, 0.0, 0, 0, Vector2(1, 2), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_cj8ky"]
|
||||
curve = SubResource("Curve_pmb0n")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_v556h"]
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 0.1
|
||||
angle_min = -381.7
|
||||
angle_max = 381.7
|
||||
gravity = Vector3(0, -5, 0)
|
||||
tangential_accel_min = -5.0
|
||||
tangential_accel_max = 5.0
|
||||
scale_curve = SubResource("CurveTexture_cj8ky")
|
||||
color_ramp = SubResource("GradientTexture1D_wjoiw")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_27esd"]
|
||||
transparency = 1
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_texture = ExtResource("12_ypuho")
|
||||
billboard_mode = 1
|
||||
billboard_keep_scale = true
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_hegkl"]
|
||||
material = SubResource("StandardMaterial3D_27esd")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_f4nyt"]
|
||||
offsets = PackedFloat32Array(0, 0.972727)
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_ovx5q"]
|
||||
gradient = SubResource("Gradient_f4nyt")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_l8e6j"]
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 0.1
|
||||
angle_min = -381.7
|
||||
angle_max = 381.7
|
||||
gravity = Vector3(0, -5, 0)
|
||||
tangential_accel_min = -5.0
|
||||
tangential_accel_max = 5.0
|
||||
scale_curve = SubResource("CurveTexture_cj8ky")
|
||||
color_ramp = SubResource("GradientTexture1D_ovx5q")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_bknuu"]
|
||||
transparency = 1
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_texture = ExtResource("13_wvbf0")
|
||||
billboard_mode = 1
|
||||
billboard_keep_scale = true
|
||||
grow_amount = 1.506
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_aeure"]
|
||||
material = SubResource("StandardMaterial3D_bknuu")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_t1nsw"]
|
||||
offsets = PackedFloat32Array(0, 0.627273, 0.927273)
|
||||
colors = PackedColorArray(1, 0.858824, 0.0784314, 1, 1, 0, 0, 1, 1, 0, 0, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_x0y0j"]
|
||||
gradient = SubResource("Gradient_t1nsw")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_fkrx7"]
|
||||
max_value = 2.0
|
||||
_data = [Vector2(0, 0.197802), 0.0, 0.0, 0, 0, Vector2(0.594203, 0.395604), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_frkde"]
|
||||
curve = SubResource("Curve_fkrx7")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_q1vdw"]
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 0.05
|
||||
angle_min = -381.7
|
||||
angle_max = 381.7
|
||||
gravity = Vector3(0, -5, 0)
|
||||
tangential_accel_min = -5.0
|
||||
tangential_accel_max = 5.0
|
||||
scale_curve = SubResource("CurveTexture_frkde")
|
||||
color_ramp = SubResource("GradientTexture1D_x0y0j")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2jwv2"]
|
||||
transparency = 1
|
||||
blend_mode = 1
|
||||
cull_mode = 2
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_texture = ExtResource("14_vughy")
|
||||
emission_enabled = true
|
||||
emission = Color(1, 0.823529, 0.701961, 1)
|
||||
billboard_mode = 3
|
||||
billboard_keep_scale = true
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = false
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_uc7ts"]
|
||||
material = SubResource("StandardMaterial3D_2jwv2")
|
||||
|
||||
[node name="Player" type="RigidBody3D" node_paths=PackedStringArray("iff")]
|
||||
collision_mask = 2147483649
|
||||
axis_lock_angular_x = true
|
||||
axis_lock_angular_y = true
|
||||
axis_lock_angular_z = true
|
||||
mass = 75.0
|
||||
physics_material_override = SubResource("PhysicsMaterial_clur0")
|
||||
can_sleep = false
|
||||
continuous_cd = true
|
||||
script = ExtResource("1_mk68k")
|
||||
iff = NodePath("Smoothing/ThirdPerson/IFF")
|
||||
jump_height = 1.5
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = ExtResource("2_vjqny")
|
||||
|
||||
[node name="WalkableSurfaceSensor" type="ShapeCast3D" parent="."]
|
||||
transform = Transform3D(1.05, 0, 0, 0, 1.05, 0, 0, 0, 1.05, 0, -0.85, 0)
|
||||
shape = SubResource("SphereShape3D_hwe6e")
|
||||
target_position = Vector3(0, 0, 0)
|
||||
collision_mask = 2147483648
|
||||
|
||||
[node name="Sensor" type="Area3D" parent="."]
|
||||
collision_layer = 0
|
||||
collision_mask = 8
|
||||
monitorable = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Sensor"]
|
||||
shape = ExtResource("2_vjqny")
|
||||
|
||||
[node name="HealthComponent" type="Area3D" parent="." node_paths=PackedStringArray("match_participant_component")]
|
||||
script = ExtResource("14_ctgxn")
|
||||
match_participant_component = NodePath("../MatchParticipantComponent")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="HealthComponent"]
|
||||
shape = ExtResource("2_vjqny")
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource("3_ccety")]
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_hg307")
|
||||
}
|
||||
autoplay = "shoot"
|
||||
playback_default_blend_time = 0.05
|
||||
|
||||
[node name="ServerSynchronizer" type="MultiplayerSynchronizer" parent="."]
|
||||
replication_config = SubResource("SceneReplicationConfig_rqdp6")
|
||||
|
||||
[node name="PlayerInput" type="MultiplayerSynchronizer" parent="."]
|
||||
root_path = NodePath(".")
|
||||
replication_config = SubResource("SceneReplicationConfig_5j4ew")
|
||||
script = ExtResource("6_ymcrr")
|
||||
|
||||
[node name="MatchParticipantComponent" type="MultiplayerSynchronizer" parent="."]
|
||||
script = ExtResource("6_lrose")
|
||||
|
||||
[node name="Smoothing" type="Node3D" parent="."]
|
||||
script = ExtResource("11_k330l")
|
||||
target = NodePath("..")
|
||||
flags = 3
|
||||
|
||||
[node name="SpringArm3D" type="SpringArm3D" parent="Smoothing"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
spring_length = 0.0
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="Smoothing/SpringArm3D"]
|
||||
fov = 90.0
|
||||
near = 0.1
|
||||
|
||||
[node name="Inventory" type="Node3D" parent="Smoothing/SpringArm3D"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="SpaceGun" parent="Smoothing/SpringArm3D/Inventory" node_paths=PackedStringArray("holder") instance=ExtResource("4_6jh57")]
|
||||
transform = Transform3D(-1, 0, 2.53518e-06, 0, 1, 0, -2.53518e-06, 0, -1, 0.15, -0.3, -0.55)
|
||||
holder = NodePath("../../../../MatchParticipantComponent")
|
||||
|
||||
[node name="SpineIKTarget" type="Node3D" parent="Smoothing/SpringArm3D"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
|
||||
[node name="FlagCarryComponent" type="Node3D" parent="Smoothing/SpringArm3D" node_paths=PackedStringArray("sensor", "carrier")]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
visible = false
|
||||
script = ExtResource("8_pdfbn")
|
||||
sensor = NodePath("../../../Sensor")
|
||||
carrier = NodePath("../../..")
|
||||
|
||||
[node name="FlagMesh" parent="Smoothing/SpringArm3D/FlagCarryComponent" instance=ExtResource("9_fce2y")]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1.559e-08, -0.462981, -0.178329)
|
||||
|
||||
[node name="ThirdPerson" type="Node3D" parent="Smoothing"]
|
||||
visible = false
|
||||
|
||||
[node name="PlayerMesh" parent="Smoothing/ThirdPerson" node_paths=PackedStringArray("spine_ik_target_attachment") instance=ExtResource("2_beyex")]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
spine_ik_target_attachment = NodePath("../../SpringArm3D/SpineIKTarget")
|
||||
|
||||
[node name="JetpackFX" type="Node3D" parent="Smoothing/ThirdPerson/PlayerMesh"]
|
||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0.187666, 0.238235, -0.147731)
|
||||
|
||||
[node name="Smoke1" type="GPUParticles3D" parent="Smoothing/ThirdPerson/PlayerMesh/JetpackFX"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.150648, 0)
|
||||
emitting = false
|
||||
lifetime = 0.5
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_v556h")
|
||||
draw_pass_1 = SubResource("QuadMesh_hegkl")
|
||||
|
||||
[node name="Smoke2" type="GPUParticles3D" parent="Smoothing/ThirdPerson/PlayerMesh/JetpackFX"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.108846, 0)
|
||||
emitting = false
|
||||
lifetime = 0.5
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_l8e6j")
|
||||
draw_pass_1 = SubResource("QuadMesh_aeure")
|
||||
|
||||
[node name="Fire1" type="GPUParticles3D" parent="Smoothing/ThirdPerson/PlayerMesh/JetpackFX"]
|
||||
emitting = false
|
||||
amount = 16
|
||||
lifetime = 0.3
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_q1vdw")
|
||||
draw_pass_1 = SubResource("QuadMesh_uc7ts")
|
||||
|
||||
[node name="IFFAttachment" type="Marker3D" parent="Smoothing/ThirdPerson"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.27457, 0)
|
||||
|
||||
[node name="IFF" parent="Smoothing/ThirdPerson" node_paths=PackedStringArray("player", "match_participant_component", "attach_point") instance=ExtResource("7_8hc80")]
|
||||
player = NodePath("../../..")
|
||||
match_participant_component = NodePath("../../../MatchParticipantComponent")
|
||||
attach_point = NodePath("../IFFAttachment")
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://ma1if3sjox6i"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://boviiugcnfyrj" path="res://modes/singleplayer/demo.tscn" id="1_50a80"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjctlqvs33nqy" path="res://interfaces/menus/boot/boot.tscn" id="1_acy5o"]
|
||||
[ext_resource type="PackedScene" uid="uid://bvwxfgygm2xb8" path="res://modes/multiplayer/multiplayer.tscn" id="2_g8xeb"]
|
||||
[ext_resource type="PackedScene" uid="uid://boviiugcnfyrj" path="res://src/modes/singleplayer/demo.tscn" id="1_50a80"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjctlqvs33nqy" path="res://src/interfaces/menus/boot/boot.tscn" id="1_acy5o"]
|
||||
[ext_resource type="PackedScene" uid="uid://bvwxfgygm2xb8" path="res://src/modes/multiplayer/multiplayer.tscn" id="2_g8xeb"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_e61dq"]
|
||||
script/source = "# This file is part of open-fpsz.
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ config/icon="res://icon.svg"
|
|||
|
||||
[autoload]
|
||||
|
||||
Settings="*res://systems/settings.gd"
|
||||
MapsManager="*res://systems/maps_manager.gd"
|
||||
Settings="*res://src/systems/settings.gd"
|
||||
MapsManager="*res://src/systems/maps_manager.gd"
|
||||
|
||||
[debug]
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ func _physics_process(_delta : float) -> void:
|
|||
|
||||
for area in get_overlapping_areas():
|
||||
if area is HealthComponent and is_multiplayer_authority():
|
||||
(area as HealthComponent).damage.rpc(damage, damage_dealer.player_id, damage_dealer.team_id)
|
||||
if damage_dealer:
|
||||
(area as HealthComponent).damage.rpc(damage, damage_dealer.player_id, damage_dealer.team_id)
|
||||
|
||||
set_physics_process(false)
|
||||
57
src/entities/components/inventory.gd
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
## This component allows its entity to interact with pickable nodes
|
||||
class_name Inventory extends Node3D
|
||||
|
||||
const _max_items = 3
|
||||
## This is the total capacity of inventory.
|
||||
@export_range(0, _max_items) var capacity : int = _max_items:
|
||||
set(value):
|
||||
capacity = clamp(value, 1, _max_items)
|
||||
|
||||
@export var selected : Node3D
|
||||
|
||||
func _ready() -> void:
|
||||
# make sure a child is selected if any
|
||||
if not selected and get_child_count():
|
||||
selected = get_child(0)
|
||||
# make sure this inventory is linked to its owner
|
||||
if not owner.inventory:
|
||||
owner.inventory = self
|
||||
|
||||
func _unhandled_input(event):
|
||||
if event is InputEventMouseButton:
|
||||
# @NOTE: there could be a control setting for direction
|
||||
if event.button_index == MOUSE_BUTTON_WHEEL_UP and event.pressed:
|
||||
roll(1)
|
||||
if event.button_index == MOUSE_BUTTON_WHEEL_DOWN and event.pressed:
|
||||
roll(-1)
|
||||
|
||||
## This method overrides [method Node.add_child] method to make sure not to exceed the inventory capacity
|
||||
func _add_child(node: Node, force_readable_name: bool = false, internal: InternalMode = 0) -> void:
|
||||
if get_child_count() <= capacity:
|
||||
super.add_child(node, force_readable_name, internal)
|
||||
|
||||
## The number of places by which the [selected] cursor is shifted in the
|
||||
## inventory. This method affects which item is selected.
|
||||
func roll(shift : int = 1) -> void:
|
||||
var sidx : int = selected.get_index()
|
||||
var cc : int = get_child_count()
|
||||
if selected:
|
||||
selected.hide()
|
||||
selected = get_child(wrapi(sidx + shift, 0, cc))
|
||||
selected.show()
|
||||
else:
|
||||
push_warning("inventory cursor cannot be rolled as no node is selected")
|
||||
|
|
@ -4,12 +4,12 @@ importer="scene"
|
|||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://d3l7fvbdg6m5g"
|
||||
path="res://.godot/imported/flag.glb-0a51d316969707bbb012f3287265227f.scn"
|
||||
path="res://.godot/imported/flag.glb-d872a6b5005907515bca9245eda66e81.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/flag/assets/flag.glb"
|
||||
dest_files=["res://.godot/imported/flag.glb-0a51d316969707bbb012f3287265227f.scn"]
|
||||
source_file="res://src/entities/flag/assets/flag.glb"
|
||||
dest_files=["res://.godot/imported/flag.glb-d872a6b5005907515bca9245eda66e81.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://c88l3h0ph00c7"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/flag/flag.gd" id="1_y7d3d"]
|
||||
[ext_resource type="Script" path="res://src/entities/flag/flag.gd" id="1_y7d3d"]
|
||||
[ext_resource type="Script" path="res://addons/smoothing/smoothing.gd" id="2_es4ce"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3l7fvbdg6m5g" path="res://entities/flag/assets/flag.glb" id="2_i78em"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcgkc5fhhyauv" path="res://entities/flag/waypoint.tscn" id="3_tu6jg"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3l7fvbdg6m5g" path="res://src/entities/flag/assets/flag.glb" id="2_i78em"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcgkc5fhhyauv" path="res://src/entities/flag/waypoint.tscn" id="3_tu6jg"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_4ymrw"]
|
||||
friction = 0.5
|
||||
bounce = 0.5
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_fkf1k"]
|
||||
size = Vector3(0.5, 2, 0.1)
|
||||
size = Vector3(0.5, 2.33994, 0.5)
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_lpijf"]
|
||||
properties/0/path = NodePath(".:position")
|
||||
|
|
@ -35,12 +35,12 @@ axis_lock_angular_z = true
|
|||
mass = 40.0
|
||||
physics_material_override = SubResource("PhysicsMaterial_4ymrw")
|
||||
center_of_mass_mode = 1
|
||||
center_of_mass = Vector3(0, 0.5, 0)
|
||||
center_of_mass = Vector3(0, 1, 0)
|
||||
continuous_cd = true
|
||||
script = ExtResource("1_y7d3d")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
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.175, 0)
|
||||
shape = SubResource("BoxShape3D_fkf1k")
|
||||
|
||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bcgkc5fhhyauv"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/flag/waypoint.gd" id="1_gmnl6"]
|
||||
[ext_resource type="Script" path="res://src/entities/flag/waypoint.gd" id="1_gmnl6"]
|
||||
|
||||
[node name="IFF" type="Control"]
|
||||
layout_mode = 3
|
||||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dmf12llra7aq5"
|
||||
path.s3tc="res://.godot/imported/Particle01.png-789728e4e363d58f11747b3cf3c5d5a3.s3tc.ctex"
|
||||
path.s3tc="res://.godot/imported/Particle01.png-91a221b05ac784633d634ee4ff59bc49.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/jetpackfx/Particle01.png"
|
||||
dest_files=["res://.godot/imported/Particle01.png-789728e4e363d58f11747b3cf3c5d5a3.s3tc.ctex"]
|
||||
source_file="res://src/entities/player/assets/jetpackfx/Particle01.png"
|
||||
dest_files=["res://.godot/imported/Particle01.png-91a221b05ac784633d634ee4ff59bc49.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ct1v5iadtpadm"
|
||||
path.s3tc="res://.godot/imported/smoke_01.png-5c3d69bc74b2f317eac64d37cd67aed3.s3tc.ctex"
|
||||
path.s3tc="res://.godot/imported/smoke_01.png-947639cde10498cdb127ff45ce477e02.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/jetpackfx/smoke_01.png"
|
||||
dest_files=["res://.godot/imported/smoke_01.png-5c3d69bc74b2f317eac64d37cd67aed3.s3tc.ctex"]
|
||||
source_file="res://src/entities/player/assets/jetpackfx/smoke_01.png"
|
||||
dest_files=["res://.godot/imported/smoke_01.png-947639cde10498cdb127ff45ce477e02.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://doxo4vfn0bjlp"
|
||||
path.s3tc="res://.godot/imported/smoke_02.png-a5343a97ff1cefeebcd82e41218739ca.s3tc.ctex"
|
||||
path.s3tc="res://.godot/imported/smoke_02.png-ecd8b2fbdcf6dc556befc84f1840a170.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/jetpackfx/smoke_02.png"
|
||||
dest_files=["res://.godot/imported/smoke_02.png-a5343a97ff1cefeebcd82e41218739ca.s3tc.ctex"]
|
||||
source_file="res://src/entities/player/assets/jetpackfx/smoke_02.png"
|
||||
dest_files=["res://.godot/imported/smoke_02.png-ecd8b2fbdcf6dc556befc84f1840a170.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dg8jhudb2pp5"
|
||||
path="res://.godot/imported/smoke_05.png-0e09dd48bb034f353433668dafb91bd9.ctex"
|
||||
path="res://.godot/imported/smoke_05.png-70d6db4430021c614703a9482bb52d05.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/jetpackfx/smoke_05.png"
|
||||
dest_files=["res://.godot/imported/smoke_05.png-0e09dd48bb034f353433668dafb91bd9.ctex"]
|
||||
source_file="res://src/entities/player/assets/jetpackfx/smoke_05.png"
|
||||
dest_files=["res://.godot/imported/smoke_05.png-70d6db4430021c614703a9482bb52d05.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bj3byo4v71rub"
|
||||
path="res://.godot/imported/smoke_06.png-551015dc27729e05438bc76194d0b9c3.ctex"
|
||||
path="res://.godot/imported/smoke_06.png-ac5fb056c885382926cf2257132d24c1.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/jetpackfx/smoke_06.png"
|
||||
dest_files=["res://.godot/imported/smoke_06.png-551015dc27729e05438bc76194d0b9c3.ctex"]
|
||||
source_file="res://src/entities/player/assets/jetpackfx/smoke_06.png"
|
||||
dest_files=["res://.godot/imported/smoke_06.png-ac5fb056c885382926cf2257132d24c1.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
class_name Vanguard extends Node
|
||||
|
||||
@export var spine_ik_target_attachment : Node3D
|
||||
@export var spine_ik_target_attachment : Marker3D
|
||||
|
||||
@onready var animation_tree : AnimationTree = $AnimationTree
|
||||
@onready var spine_ik : SkeletonIK3D = $Node/Skeleton3D/SpineIK
|
||||
|
|
@ -4,12 +4,12 @@ importer="scene"
|
|||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://4naw661fqmjg"
|
||||
path="res://.godot/imported/vanguard.glb-cadeef0df4a787cdbb2a53b5a94a5c23.scn"
|
||||
path="res://.godot/imported/vanguard.glb-fc8e6f96ea4fae530d4397b5c8b98a01.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/vanguard.glb"
|
||||
dest_files=["res://.godot/imported/vanguard.glb-cadeef0df4a787cdbb2a53b5a94a5c23.scn"]
|
||||
source_file="res://src/entities/player/assets/vanguard.glb"
|
||||
dest_files=["res://.godot/imported/vanguard.glb-fc8e6f96ea4fae530d4397b5c8b98a01.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=28 format=3 uid="uid://drbefw6akui2v"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://4naw661fqmjg" path="res://entities/player/assets/vanguard.glb" id="1_d2ik6"]
|
||||
[ext_resource type="Script" path="res://entities/player/assets/vanguard.gd" id="2_c22xr"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjcn37ops3bro" path="res://entities/weapons/space_gun/assets/disclauncher.glb" id="3_s13xh"]
|
||||
[ext_resource type="PackedScene" uid="uid://4naw661fqmjg" path="res://src/entities/player/assets/vanguard.glb" id="1_d2ik6"]
|
||||
[ext_resource type="Script" path="res://src/entities/player/assets/vanguard.gd" id="2_c22xr"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjcn37ops3bro" path="res://src/entities/weapons/space_gun/assets/disclauncher.glb" id="3_s13xh"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_bdd76"]
|
||||
resource_name = "t_pose"
|
||||
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ia3bdpe4rm1m"
|
||||
path.bptc="res://.godot/imported/vanguard_0.png-601f36bc664114e126d425d5f45085ef.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/vanguard_0.png-64957e4bbafcdc02f90db1244f91c618.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -12,8 +12,8 @@ generator_parameters={}
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/vanguard_0.png"
|
||||
dest_files=["res://.godot/imported/vanguard_0.png-601f36bc664114e126d425d5f45085ef.bptc.ctex"]
|
||||
source_file="res://src/entities/player/assets/vanguard_0.png"
|
||||
dest_files=["res://.godot/imported/vanguard_0.png-64957e4bbafcdc02f90db1244f91c618.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bvgfmpb2l1juf"
|
||||
path.bptc="res://.godot/imported/vanguard_1.png-39b5712c4c4119a42b3540a159f8b3f2.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/vanguard_1.png-5b636398aa3d94ff381564cffba3a483.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -12,8 +12,8 @@ generator_parameters={}
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/vanguard_1.png"
|
||||
dest_files=["res://.godot/imported/vanguard_1.png-39b5712c4c4119a42b3540a159f8b3f2.bptc.ctex"]
|
||||
source_file="res://src/entities/player/assets/vanguard_1.png"
|
||||
dest_files=["res://.godot/imported/vanguard_1.png-5b636398aa3d94ff381564cffba3a483.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://vtrbc3eja3df"
|
||||
path.bptc="res://.godot/imported/vanguard_2.png-986e3665904b0d4758f584d5d3b7b726.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/vanguard_2.png-6729401188d55838373c08fb093c1c93.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -12,8 +12,8 @@ generator_parameters={}
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/vanguard_2.png"
|
||||
dest_files=["res://.godot/imported/vanguard_2.png-986e3665904b0d4758f584d5d3b7b726.bptc.ctex"]
|
||||
source_file="res://src/entities/player/assets/vanguard_2.png"
|
||||
dest_files=["res://.godot/imported/vanguard_2.png-6729401188d55838373c08fb093c1c93.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -18,6 +18,10 @@ enum PlayerState { PLAYER_ALIVE, PLAYER_DEAD }
|
|||
|
||||
@export var iff : Control
|
||||
|
||||
## The inventory component can store up to [member Inventory.slots] objects. It
|
||||
## also has specific slots to hold grenades, packs and a flag.
|
||||
@export var inventory : Inventory
|
||||
|
||||
@export_category("Parameters")
|
||||
@export var ground_speed : float = 48 / 3.6 # m/s
|
||||
@export var aerial_control_force : int = 400
|
||||
|
|
@ -37,16 +41,13 @@ enum PlayerState { PLAYER_ALIVE, PLAYER_DEAD }
|
|||
@export var player_state : PlayerState = PlayerState.PLAYER_ALIVE
|
||||
|
||||
@onready var input : PlayerInput = $PlayerInput
|
||||
@onready var camera : Camera3D = $Smoothing/SpringArm3D/Camera3D
|
||||
@onready var camera : Camera3D = %Pivot/Camera3D
|
||||
@onready var hud : CanvasLayer = $HUD
|
||||
@onready var walkable_surface_sensor : ShapeCast3D = $WalkableSurfaceSensor
|
||||
@onready var weapon : Node3D = $Smoothing/SpringArm3D/Inventory/SpaceGun
|
||||
@onready var animation_player : AnimationPlayer = $AnimationPlayer
|
||||
@onready var health_component : Area3D = $HealthComponent
|
||||
@onready var collision_shape : CollisionShape3D = $CollisionShape3D
|
||||
@onready var flag_carry_component : FlagCarryComponent = $Smoothing/SpringArm3D/FlagCarryComponent
|
||||
@onready var spring_arm_height : float = $Smoothing/SpringArm3D.position.y
|
||||
@onready var _original_weapon_transform : Transform3D = weapon.transform
|
||||
@onready var flag_carry_component : FlagCarryComponent = %Pivot/FlagCarryComponent
|
||||
@onready var tp_player : Vanguard = $Smoothing/ThirdPerson/PlayerMesh
|
||||
@onready var jetpack_particles : Array = $Smoothing/ThirdPerson/PlayerMesh/JetpackFX.get_children()
|
||||
@onready var match_participant_component : MatchParticipantComponent = $MatchParticipantComponent
|
||||
|
|
@ -69,41 +70,27 @@ func _ready() -> void:
|
|||
health_component.health_zeroed.connect(die)
|
||||
|
||||
energy_changed.connect(hud._on_energy_changed)
|
||||
input.fired_primary.connect(_fire_primary)
|
||||
input.fired_primary.connect(_trigger.bind(inventory.selected))
|
||||
input.jumped.connect(_jump)
|
||||
input.throwed_flag.connect(_throw_flag)
|
||||
|
||||
input.MOUSE_SENSITIVITY = Settings.get_value("controls", "mouse_sensitivity")
|
||||
input.inverted_y_axis = Settings.get_value("controls", "inverted_y_axis")
|
||||
|
||||
func _setup_pawn(_new_player_id : int) -> void:
|
||||
if _is_pawn():
|
||||
camera.current = true
|
||||
camera.fov = Settings.get_value("video", "fov")
|
||||
pawn_player = self
|
||||
# set the spring arm translation to be about head height level
|
||||
$Smoothing/SpringArm3D.transform = Transform3D().translated(Vector3(0, collision_shape.shape.height / 2, 0) * 0.9)
|
||||
else:
|
||||
# set the iff attachment translation to be about head height level
|
||||
$Smoothing/ThirdPerson/IFFAttachment.transform = Transform3D().translated(Vector3(0, collision_shape.shape.height / 2, 0) * 0.9)
|
||||
$Smoothing/ThirdPerson.show()
|
||||
hud.hide()
|
||||
weapon.hide()
|
||||
|
||||
func _is_pawn() -> bool:
|
||||
var game : Node3D = get_node("/root/Game")
|
||||
var peer_is_pawn = multiplayer.get_unique_id() == match_participant_component.player_id
|
||||
var peer_is_pawn : bool = multiplayer.get_unique_id() == match_participant_component.player_id
|
||||
return game.mode is Singleplayer or peer_is_pawn
|
||||
|
||||
func _fire_primary() -> void:
|
||||
if _is_player_dead():
|
||||
return
|
||||
if not weapon.can_fire():
|
||||
return
|
||||
var current_weapon_transform : Transform3D = weapon.transform
|
||||
weapon.transform = _original_weapon_transform
|
||||
weapon.fire_primary()
|
||||
weapon.transform = current_weapon_transform
|
||||
func _trigger(weapon : Weapon) -> void:
|
||||
if not _is_player_dead() and weapon != null:
|
||||
weapon.trigger()
|
||||
|
||||
func _jump() -> void:
|
||||
if _is_player_dead():
|
||||
|
|
@ -147,11 +134,13 @@ func _process(_delta : float) -> void:
|
|||
return
|
||||
else:
|
||||
iff.show()
|
||||
if not _is_pawn():
|
||||
|
||||
%Pivot.global_transform.basis = Basis.from_euler(Vector3(input.camera_rotation.y, input.camera_rotation.x, 0.0))
|
||||
|
||||
if _is_pawn():
|
||||
pass
|
||||
else:
|
||||
tp_player.global_transform.basis = Basis.from_euler(Vector3(0.0, input.camera_rotation.x + PI, 0.0))
|
||||
elif not %Inventory/SpaceGun/Mesh/AnimationPlayer.is_playing():
|
||||
%Inventory/SpaceGun/Mesh/AnimationPlayer.play("idle")
|
||||
%SpringArm3D.global_transform.basis = Basis.from_euler(Vector3(input.camera_rotation.y, input.camera_rotation.x, 0.0))
|
||||
|
||||
func _physics_process(delta : float) -> void:
|
||||
_update_jetpack_energy(delta)
|
||||
|
|
@ -168,7 +157,7 @@ func _handle_movement() -> void:
|
|||
return
|
||||
|
||||
# adjust direction based on spring arm rotation
|
||||
_direction = _direction.rotated(Vector3.UP, $Smoothing/SpringArm3D.rotation.y)
|
||||
_direction = _direction.rotated(Vector3.UP, %Pivot.rotation.y)
|
||||
|
||||
_handle_aerial_control(_direction)
|
||||
_handle_jetpack(_direction)
|
||||
496
src/entities/player/player.tscn
Normal file
|
|
@ -18,8 +18,6 @@ class_name PlayerInput extends MultiplayerSynchronizer
|
|||
@export var skiing : bool = false
|
||||
@export var direction : Vector2 = Vector2.ZERO
|
||||
@export var camera_rotation : Vector2
|
||||
@export var MOUSE_SENSITIVITY : float = .6
|
||||
@export var inverted_y_axis : bool = false
|
||||
|
||||
signal jumped
|
||||
signal fired_primary
|
||||
|
|
@ -44,13 +42,13 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||
|
||||
func _update_camera(relative_motion : Vector2) -> void:
|
||||
# reverse y axis
|
||||
if inverted_y_axis:
|
||||
if Settings.get_value("controls", "inverted_y_axis"):
|
||||
relative_motion.y *= -1.0
|
||||
# clamp vertical rotation (head motion)
|
||||
camera_rotation.y -= relative_motion.y * MOUSE_SENSITIVITY / 100
|
||||
camera_rotation.y -= relative_motion.y * Settings.get_value("controls", "mouse_sensitivity") / 100
|
||||
camera_rotation.y = clamp(camera_rotation.y, deg_to_rad(-90.0), deg_to_rad(90.0))
|
||||
# wrap horizontal rotation (to prevent accumulation)
|
||||
camera_rotation.x -= relative_motion.x * MOUSE_SENSITIVITY / 100
|
||||
camera_rotation.x -= relative_motion.x * Settings.get_value("controls", "mouse_sensitivity") / 100
|
||||
camera_rotation.x = wrapf(camera_rotation.x, deg_to_rad(0.0), deg_to_rad(360.0))
|
||||
|
||||
func _process(_delta : float) -> void:
|
||||
|
|
@ -4,12 +4,12 @@ importer="scene"
|
|||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://chuein4frnvwt"
|
||||
path="res://.godot/imported/player_mesh.glb-a0e04e00b0469c9659174448aceb10a7.scn"
|
||||
path="res://.godot/imported/player_mesh.glb-e04f813b01e0d89f826988e7bd9bf90a.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/target_dummy/assets/player_mesh.glb"
|
||||
dest_files=["res://.godot/imported/player_mesh.glb-a0e04e00b0469c9659174448aceb10a7.scn"]
|
||||
source_file="res://src/entities/target_dummy/assets/player_mesh.glb"
|
||||
dest_files=["res://.godot/imported/player_mesh.glb-e04f813b01e0d89f826988e7bd9bf90a.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dpnu1lvfncx6q"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/target_dummy/target_dummy.gd" id="1_iup5v"]
|
||||
[ext_resource type="Shape3D" uid="uid://cb8esdlnottdn" path="res://entities/player/collision_shape.tres" id="2_i5k5j"]
|
||||
[ext_resource type="PackedScene" uid="uid://chuein4frnvwt" path="res://entities/target_dummy/assets/player_mesh.glb" id="4_fuync"]
|
||||
[ext_resource type="Script" path="res://src/entities/target_dummy/target_dummy.gd" id="1_iup5v"]
|
||||
[ext_resource type="Shape3D" uid="uid://cb8esdlnottdn" path="res://src/entities/player/collision_shape.tres" id="2_i5k5j"]
|
||||
[ext_resource type="PackedScene" uid="uid://chuein4frnvwt" path="res://src/entities/target_dummy/assets/player_mesh.glb" id="4_fuync"]
|
||||
|
||||
[node name="DummyTarget" type="RigidBody3D"]
|
||||
collision_layer = 2147483649
|
||||
|
|
@ -4,12 +4,12 @@ importer="scene"
|
|||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bjcn37ops3bro"
|
||||
path="res://.godot/imported/disclauncher.glb-e58edebbe444fad4554f8c76e8b18f06.scn"
|
||||
path="res://.godot/imported/disclauncher.glb-6bdd246410d96484e4ed7479e30de867.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/weapons/space_gun/assets/disclauncher.glb"
|
||||
dest_files=["res://.godot/imported/disclauncher.glb-e58edebbe444fad4554f8c76e8b18f06.scn"]
|
||||
source_file="res://src/entities/weapons/space_gun/assets/disclauncher.glb"
|
||||
dest_files=["res://.godot/imported/disclauncher.glb-6bdd246410d96484e4ed7479e30de867.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
class_name Projectile extends Node3D
|
||||
class_name SpaceGunProjectile extends Node3D
|
||||
|
||||
@export_category("Parameters")
|
||||
@export var EXPLOSION : PackedScene
|
||||
|
|
@ -28,7 +28,6 @@ var velocity : Vector3 = Vector3.ZERO
|
|||
var shooter : MatchParticipantComponent
|
||||
|
||||
func _ready() -> void:
|
||||
assert(shooter)
|
||||
var lifespan_timer : Timer = Timer.new()
|
||||
lifespan_timer.wait_time = lifespan
|
||||
lifespan_timer.one_shot = true
|
||||
|
|
@ -45,12 +44,9 @@ func _ready() -> void:
|
|||
|
||||
func self_destruct() -> void:
|
||||
explode(position)
|
||||
|
||||
func explode(spawn_location : Vector3) -> void:
|
||||
var spawned_explosion : Node = EXPLOSION.instantiate()
|
||||
spawned_explosion.position = spawn_location
|
||||
spawned_explosion.shooter = shooter
|
||||
game.add_child(spawned_explosion)
|
||||
|
||||
func explode(spawn_position : Vector3) -> void:
|
||||
game.add_child(SpaceGunProjectileExplosion.new_explosion(spawn_position, shooter, EXPLOSION))
|
||||
queue_free()
|
||||
|
||||
func _physics_process(delta : float) -> void:
|
||||
|
|
@ -61,5 +57,13 @@ func _physics_process(delta : float) -> void:
|
|||
var contact_point : Vector3 = shape_cast.collision_result[0].point
|
||||
explode(contact_point)
|
||||
|
||||
## This method is a parameterized constructor for the [SpaceGunProjectile] scene of the [SpaceGun]
|
||||
static func new_projectile(origin : Marker3D, _shooter : MatchParticipantComponent, inherited_velocity : Vector3, scene : PackedScene) -> SpaceGunProjectile:
|
||||
var projectile : SpaceGunProjectile = scene.instantiate()
|
||||
projectile.shooter = _shooter
|
||||
projectile.transform = origin.global_transform
|
||||
projectile.velocity = origin.global_basis.z.normalized() * projectile.speed + inherited_velocity
|
||||
return projectile
|
||||
|
||||
func _enable_trail() -> void:
|
||||
projectile_trail._trail_enabled = true
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://dn1tcakam5egs"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/weapons/space_gun/projectile.gd" id="1_4j1dp"]
|
||||
[ext_resource type="PackedScene" uid="uid://8atq41j7wd55" path="res://entities/weapons/space_gun/projectile_explosion.tscn" id="2_llml6"]
|
||||
[ext_resource type="Script" path="res://src/entities/weapons/space_gun/projectile.gd" id="1_4j1dp"]
|
||||
[ext_resource type="PackedScene" uid="uid://8atq41j7wd55" path="res://src/entities/weapons/space_gun/projectile_explosion.tscn" id="2_llml6"]
|
||||
[ext_resource type="Script" path="res://addons/smoothing/smoothing.gd" id="3_dmi64"]
|
||||
[ext_resource type="Script" path="res://entities/weapons/space_gun/projectile_trail.gd" id="3_ygqbh"]
|
||||
[ext_resource type="Script" path="res://src/entities/weapons/space_gun/projectile_trail.gd" id="3_ygqbh"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_umtte"]
|
||||
radius = 0.15
|
||||
38
src/entities/weapons/space_gun/projectile_explosion.gd
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
class_name SpaceGunProjectileExplosion extends Node3D
|
||||
|
||||
@export var explosive_damage : ExplosiveDamageComponent
|
||||
|
||||
@onready var fire : GPUParticles3D = $Fire
|
||||
|
||||
var explosion_effect_pending : bool = false
|
||||
|
||||
var shooter : MatchParticipantComponent:
|
||||
set(value):
|
||||
shooter = value
|
||||
explosive_damage.damage_dealer = value
|
||||
|
||||
func _ready() -> void:
|
||||
fire.emitting = true
|
||||
fire.finished.connect(func() -> void: queue_free())
|
||||
|
||||
## This method is a parameterized constructor for the [SpaceGunProjectileExplosion] scene of the [SpaceGunProjectile]
|
||||
static func new_explosion(spawn_position : Vector3, _shooter : MatchParticipantComponent, scene : PackedScene) -> SpaceGunProjectileExplosion:
|
||||
var explosion : SpaceGunProjectileExplosion = scene.instantiate()
|
||||
explosion.shooter = _shooter
|
||||
explosion.explosive_damage.damage_dealer = _shooter
|
||||
explosion.position = spawn_position
|
||||
return explosion
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://8atq41j7wd55"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/weapons/space_gun/projectile_explosion.gd" id="1_fp5td"]
|
||||
[ext_resource type="Script" path="res://entities/components/explosive_damage_component.gd" id="2_28ymv"]
|
||||
[ext_resource type="Script" path="res://src/entities/weapons/space_gun/projectile_explosion.gd" id="1_fp5td"]
|
||||
[ext_resource type="Script" path="res://src/entities/components/explosive_damage_component.gd" id="2_28ymv"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_rg204"]
|
||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
|
|
@ -29,8 +29,9 @@ material = SubResource("StandardMaterial3D_wpu51")
|
|||
margin = 0.05
|
||||
radius = 5.0
|
||||
|
||||
[node name="ProjectileExplosion" type="Node3D"]
|
||||
[node name="ProjectileExplosion" type="Node3D" node_paths=PackedStringArray("explosive_damage")]
|
||||
script = ExtResource("1_fp5td")
|
||||
explosive_damage = NodePath("ExplosiveDamageComponent")
|
||||
|
||||
[node name="Fire" type="GPUParticles3D" parent="."]
|
||||
emitting = false
|
||||
|
|
@ -12,45 +12,42 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends Node3D
|
||||
class_name SpaceGun
|
||||
class_name SpaceGun extends Weapon
|
||||
|
||||
@export var nozzle : Marker3D
|
||||
@export var fire_rate : float = 1. # seconds
|
||||
@export var reload_time : float = 1. # seconds
|
||||
|
||||
@export_category("Projectile")
|
||||
@export var PROJECTILE : PackedScene
|
||||
@export var holder : MatchParticipantComponent
|
||||
|
||||
@onready var nozzle : Node3D = $Nozzle
|
||||
@onready var inventory : Node3D = get_parent()
|
||||
@export var inheritance : float = .5 # ratio
|
||||
|
||||
enum WeaponState { WEAPON_READY, WEAPON_RELOADING }
|
||||
|
||||
var weapon_state : WeaponState = WeaponState.WEAPON_READY
|
||||
|
||||
const inheritance : float = .5 # ratio
|
||||
const reload_time : float = 1. # seconds
|
||||
var state : WeaponState = WeaponState.WEAPON_READY
|
||||
|
||||
func can_fire() -> bool:
|
||||
return weapon_state == WeaponState.WEAPON_READY
|
||||
return state == WeaponState.WEAPON_READY
|
||||
|
||||
func fire_primary() -> void:
|
||||
func trigger() -> void:
|
||||
# check permission
|
||||
if not can_fire():
|
||||
return
|
||||
# init projectile
|
||||
var projectile : Node = PROJECTILE.instantiate()
|
||||
# configure projectile
|
||||
projectile.shooter = holder
|
||||
projectile.transform = nozzle.global_transform
|
||||
projectile.velocity = nozzle.global_basis.z.normalized() * projectile.speed
|
||||
var inheritance_factor : float = clamp(inheritance, 0., 1.)
|
||||
projectile.velocity += (inventory.owner.linear_velocity * inheritance_factor)
|
||||
# play the fire animation
|
||||
$Mesh/AnimationPlayer.play("fire")
|
||||
# add projectile as sibling of the owner
|
||||
inventory.owner.add_sibling(projectile)
|
||||
# init projectile
|
||||
var inheritance_factor : float = clamp(inheritance, 0., 1.)
|
||||
var projectile : Node = SpaceGunProjectile.new_projectile(nozzle, owner.match_participant_component, owner.linear_velocity * inheritance_factor, PROJECTILE)
|
||||
# add to owner of player for now
|
||||
owner.owner.add_sibling(projectile)
|
||||
# ensure projectile does not collide with owner
|
||||
var collider : ShapeCast3D = projectile.shape_cast
|
||||
collider.add_exception(inventory.owner)
|
||||
collider.add_exception(owner)
|
||||
# update states
|
||||
weapon_state = WeaponState.WEAPON_RELOADING
|
||||
state = WeaponState.WEAPON_RELOADING
|
||||
await get_tree().create_timer(reload_time).timeout
|
||||
weapon_state = WeaponState.WEAPON_READY
|
||||
state = WeaponState.WEAPON_READY
|
||||
|
||||
func _on_visibility_changed() -> void:
|
||||
if self.visible:
|
||||
self.anim_player.play("equip")
|
||||
#self.sounds.play("equip")
|
||||
|
|
@ -1,16 +1,19 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://c8co0qa2omjmh"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/weapons/space_gun/space_gun.gd" id="1_6sm4s"]
|
||||
[ext_resource type="PackedScene" uid="uid://dn1tcakam5egs" path="res://entities/weapons/space_gun/projectile.tscn" id="2_wvneg"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjcn37ops3bro" path="res://entities/weapons/space_gun/assets/disclauncher.glb" id="3_5k2xm"]
|
||||
[ext_resource type="Script" path="res://src/entities/weapons/space_gun/space_gun.gd" id="1_6sm4s"]
|
||||
[ext_resource type="PackedScene" uid="uid://dn1tcakam5egs" path="res://src/entities/weapons/space_gun/projectile.tscn" id="2_wvneg"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjcn37ops3bro" path="res://src/entities/weapons/space_gun/assets/disclauncher.glb" id="3_5k2xm"]
|
||||
|
||||
[node name="SpaceGun" type="Node3D"]
|
||||
[node name="SpaceGun" type="Node3D" node_paths=PackedStringArray("nozzle", "anim_player")]
|
||||
script = ExtResource("1_6sm4s")
|
||||
nozzle = NodePath("Nozzle")
|
||||
PROJECTILE = ExtResource("2_wvneg")
|
||||
anim_player = NodePath("Mesh/AnimationPlayer")
|
||||
|
||||
[node name="Mesh" parent="." instance=ExtResource("3_5k2xm")]
|
||||
|
||||
[node name="Skeleton3D" parent="Mesh/Armature" index="0"]
|
||||
bones/0/rotation = Quaternion(0.707107, -5.33851e-08, -5.33851e-08, 0.707107)
|
||||
bones/0/scale = Vector3(1, 1, 1)
|
||||
bones/1/rotation = Quaternion(-0.707107, 5.33851e-08, 5.33851e-08, 0.707107)
|
||||
bones/1/scale = Vector3(1, 1, 1)
|
||||
|
|
@ -20,15 +23,20 @@ bones/3/rotation = Quaternion(-0.707107, 5.33851e-08, 5.33851e-08, 0.707107)
|
|||
bones/3/scale = Vector3(1, 1, 1)
|
||||
|
||||
[node name="grip" parent="Mesh/Armature/Skeleton3D" index="0"]
|
||||
transform = Transform3D(1, -4.26326e-14, -2.13163e-14, 2.84217e-14, 1, -3.57628e-07, 3.2684e-14, 3.57628e-07, 1, -1.42109e-14, -2.98023e-07, 2.38419e-07)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.84217e-14, 1.19209e-07, 2.38419e-07)
|
||||
|
||||
[node name="main" parent="Mesh/Armature/Skeleton3D" index="1"]
|
||||
transform = Transform3D(1, -4.26326e-14, -2.13163e-14, 2.84217e-14, 1, -3.57628e-07, 3.2684e-14, 3.57628e-07, 1, -1.42109e-14, -2.98023e-07, 2.38419e-07)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.84217e-14, 1.19209e-07, 2.38419e-07)
|
||||
|
||||
[node name="sides" parent="Mesh/Armature/Skeleton3D" index="2"]
|
||||
transform = Transform3D(1, -4.26326e-14, -2.13163e-14, 2.84217e-14, 1, -3.57628e-07, 3.2684e-14, 3.57628e-07, 1, -1.42109e-14, -2.98023e-07, 2.38419e-07)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.84217e-14, 1.19209e-07, 2.38419e-07)
|
||||
|
||||
[node name="Nozzle" type="Node3D" parent="."]
|
||||
[node name="AnimationPlayer" parent="Mesh" index="1"]
|
||||
autoplay = "idle"
|
||||
|
||||
[node name="Nozzle" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.27)
|
||||
|
||||
[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"]
|
||||
|
||||
[editable path="Mesh"]
|
||||
|
|
@ -12,16 +12,13 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends Node3D
|
||||
class_name Weapon extends Node3D
|
||||
|
||||
var shooter : MatchParticipantComponent
|
||||
## The animation player responsible for the [Weapon] animation playback.
|
||||
@export var anim_player : AnimationPlayer
|
||||
|
||||
@onready var fire : GPUParticles3D = $Fire
|
||||
@onready var explosive_damage : ExplosiveDamageComponent = $ExplosiveDamageComponent
|
||||
var explosion_effect_pending : bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
assert(shooter)
|
||||
explosive_damage.damage_dealer = shooter
|
||||
fire.emitting = true
|
||||
fire.finished.connect(func() -> void: queue_free())
|
||||
func trigger() -> void:
|
||||
push_error("not implemented yet")
|
||||
|
||||
func reload() -> void:
|
||||
push_error("not implemented yet")
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://btdbu0qbe1646"
|
||||
path.bptc="res://.godot/imported/kloppenheim_06_puresky_2k.exr-ec828ffc9b05b2c03fb35e84cd230d2d.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/kloppenheim_06_puresky_2k.exr-93faddefe7138c6927d1fd8914ed5be0.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://environments/skyboxes/kloppenheim_06_puresky_2k.exr"
|
||||
dest_files=["res://.godot/imported/kloppenheim_06_puresky_2k.exr-ec828ffc9b05b2c03fb35e84cd230d2d.bptc.ctex"]
|
||||
source_file="res://src/environments/skyboxes/kloppenheim_06_puresky_2k.exr"
|
||||
dest_files=["res://.godot/imported/kloppenheim_06_puresky_2k.exr-93faddefe7138c6927d1fd8914ed5be0.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://bcv81ku26xo"]
|
||||
|
||||
[ext_resource type="StyleBox" uid="uid://dcn1ll2ra4lwn" path="res://interfaces/hud/vitals/background.tres" id="1_gmv44"]
|
||||
[ext_resource type="StyleBox" uid="uid://bq7rjpm38pao7" path="res://interfaces/hud/vitals/health_foreground.tres" id="2_6ejsl"]
|
||||
[ext_resource type="StyleBox" uid="uid://dcn1ll2ra4lwn" path="res://src/interfaces/hud/vitals/background.tres" id="1_gmv44"]
|
||||
[ext_resource type="StyleBox" uid="uid://bq7rjpm38pao7" path="res://src/interfaces/hud/vitals/health_foreground.tres" id="2_6ejsl"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_2vxif"]
|
||||
script/source = "# This file is part of open-fpsz.
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dsysi2rd3bu76"]
|
||||
|
||||
[ext_resource type="Script" path="res://interfaces/hud/iffs/iff.gd" id="1_g1wra"]
|
||||
[ext_resource type="StyleBox" uid="uid://cgv081wfih7la" path="res://interfaces/hud/iffs/health_foreground.tres" id="2_e3xla"]
|
||||
[ext_resource type="StyleBox" uid="uid://dcn1ll2ra4lwn" path="res://interfaces/hud/vitals/background.tres" id="2_jtos4"]
|
||||
[ext_resource type="Script" path="res://src/interfaces/hud/iffs/iff.gd" id="1_g1wra"]
|
||||
[ext_resource type="StyleBox" uid="uid://cgv081wfih7la" path="res://src/interfaces/hud/iffs/health_foreground.tres" id="2_e3xla"]
|
||||
[ext_resource type="StyleBox" uid="uid://dcn1ll2ra4lwn" path="res://src/interfaces/hud/vitals/background.tres" id="2_jtos4"]
|
||||
|
||||
[node name="IFF" type="Control"]
|
||||
layout_mode = 3
|
||||
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c1tjamjm8qjog"
|
||||
path="res://.godot/imported/background.webp-f3f369ebd80fe0ef765a073acba84e0f.ctex"
|
||||
path="res://.godot/imported/background.webp-3afc239cb0209ca1f9f40cd7b3176d4d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://interfaces/menus/boot/background.webp"
|
||||
dest_files=["res://.godot/imported/background.webp-f3f369ebd80fe0ef765a073acba84e0f.ctex"]
|
||||
source_file="res://src/interfaces/menus/boot/background.webp"
|
||||
dest_files=["res://.godot/imported/background.webp-3afc239cb0209ca1f9f40cd7b3176d4d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=28 format=3 uid="uid://bjctlqvs33nqy"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c1tjamjm8qjog" path="res://interfaces/menus/boot/background.webp" id="1_ph586"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1tjamjm8qjog" path="res://src/interfaces/menus/boot/background.webp" id="1_ph586"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_jd8xf"]
|
||||
resource_name = "MainMenu"
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://b8bosdd0o1lu7"]
|
||||
|
||||
[ext_resource type="Script" path="res://interfaces/scoreboard/scoreboard.gd" id="1_k2wav"]
|
||||
[ext_resource type="Script" path="res://src/interfaces/scoreboard/scoreboard.gd" id="1_k2wav"]
|
||||
|
||||
[node name="Scoreboard" type="Control"]
|
||||
layout_mode = 3
|
||||
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cngjywcua4vv8"
|
||||
path.bptc="res://.godot/imported/ground054_alb_ht.png-460d3ac5c09d7955ca61b8b57742b1a9.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/ground054_alb_ht.png-70ea91effe4531981396a2d43275ea63.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://maps/desert/assets/textures/ground054_alb_ht.png"
|
||||
dest_files=["res://.godot/imported/ground054_alb_ht.png-460d3ac5c09d7955ca61b8b57742b1a9.bptc.ctex"]
|
||||
source_file="res://src/maps/desert/assets/textures/ground054_alb_ht.png"
|
||||
dest_files=["res://.godot/imported/ground054_alb_ht.png-70ea91effe4531981396a2d43275ea63.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cbk7l6hs0yrcc"
|
||||
path.bptc="res://.godot/imported/ground054_nrm_rgh.png-9ea209f1a7f6e48624db85005a037890.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/ground054_nrm_rgh.png-4145ca5fe0f4cfafd2ec70c01b03e47c.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://maps/desert/assets/textures/ground054_nrm_rgh.png"
|
||||
dest_files=["res://.godot/imported/ground054_nrm_rgh.png-9ea209f1a7f6e48624db85005a037890.bptc.ctex"]
|
||||
source_file="res://src/maps/desert/assets/textures/ground054_nrm_rgh.png"
|
||||
dest_files=["res://.godot/imported/ground054_nrm_rgh.png-4145ca5fe0f4cfafd2ec70c01b03e47c.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.3 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dwk8islw7ebab"
|
||||
path.bptc="res://.godot/imported/rock029_alb_ht.png-dd746789bc129bafaa8d1cc908de0e3e.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/rock029_alb_ht.png-926dc89f22cc2e648ae6ea04ac460eb4.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://maps/desert/assets/textures/rock029_alb_ht.png"
|
||||
dest_files=["res://.godot/imported/rock029_alb_ht.png-dd746789bc129bafaa8d1cc908de0e3e.bptc.ctex"]
|
||||
source_file="res://src/maps/desert/assets/textures/rock029_alb_ht.png"
|
||||
dest_files=["res://.godot/imported/rock029_alb_ht.png-926dc89f22cc2e648ae6ea04ac460eb4.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 MiB After Width: | Height: | Size: 3.2 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://lgfhdcsb2ryx"
|
||||
path.bptc="res://.godot/imported/rock029_nrm_rgh.png-3bf029664d0f58a1c79abd2d6666ba90.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/rock029_nrm_rgh.png-65b42c4b71af719b7b7e92274266dce0.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://maps/desert/assets/textures/rock029_nrm_rgh.png"
|
||||
dest_files=["res://.godot/imported/rock029_nrm_rgh.png-3bf029664d0f58a1c79abd2d6666ba90.bptc.ctex"]
|
||||
source_file="res://src/maps/desert/assets/textures/rock029_nrm_rgh.png"
|
||||
dest_files=["res://.godot/imported/rock029_nrm_rgh.png-65b42c4b71af719b7b7e92274266dce0.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://btlkog4b87p4x"]
|
||||
|
||||
[ext_resource type="Terrain3DStorage" uid="uid://wgmg245njt8e" path="res://maps/desert/resources/storage.res" id="1_7nbyj"]
|
||||
[ext_resource type="Terrain3DMaterial" uid="uid://c3isipd4wqxpk" path="res://maps/desert/resources/material.tres" id="2_psdr0"]
|
||||
[ext_resource type="Terrain3DTextureList" uid="uid://d1j24k8sq8qpj" path="res://maps/desert/resources/textures.tres" id="3_aowug"]
|
||||
[ext_resource type="Environment" uid="uid://nw62ce5cglvs" path="res://maps/desert/resources/env.tres" id="5_4l4vc"]
|
||||
[ext_resource type="PackedScene" uid="uid://brux62vritay" path="res://entities/buildings/flag_stand.tscn" id="5_5n76t"]
|
||||
[ext_resource type="Terrain3DStorage" uid="uid://wgmg245njt8e" path="res://src/maps/desert/resources/storage.res" id="1_lmk23"]
|
||||
[ext_resource type="Terrain3DMaterial" uid="uid://c3isipd4wqxpk" path="res://src/maps/desert/resources/material.tres" id="2_n44fh"]
|
||||
[ext_resource type="Terrain3DTextureList" uid="uid://d1j24k8sq8qpj" path="res://src/maps/desert/resources/textures.tres" id="3_w1yus"]
|
||||
[ext_resource type="Environment" uid="uid://nw62ce5cglvs" path="res://src/maps/desert/resources/env.tres" id="4_m7p64"]
|
||||
[ext_resource type="PackedScene" uid="uid://brux62vritay" path="res://src/entities/buildings/flag_stand.tscn" id="5_7ta6y"]
|
||||
|
||||
[node name="Desert" type="Terrain3D"]
|
||||
storage = ExtResource("1_7nbyj")
|
||||
material = ExtResource("2_psdr0")
|
||||
texture_list = ExtResource("3_aowug")
|
||||
storage = ExtResource("1_lmk23")
|
||||
material = ExtResource("2_n44fh")
|
||||
texture_list = ExtResource("3_w1yus")
|
||||
collision_layer = 2147483648
|
||||
collision_mask = 2147483648
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ transform = Transform3D(0.5, 0.55667, -0.663414, 0, 0.766044, 0.642788, 0.866025
|
|||
shadow_enabled = true
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = ExtResource("5_4l4vc")
|
||||
environment = ExtResource("4_m7p64")
|
||||
|
||||
[node name="PlayerSpawns" type="Node" parent="."]
|
||||
|
||||
|
|
@ -34,5 +34,5 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 895.356, 147.271, 888.261)
|
|||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 1024, 920, 1024)
|
||||
|
||||
[node name="FlagStand2" parent="." instance=ExtResource("5_5n76t")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 895.366, 145.193, 888.267)
|
||||
[node name="FlagPillar" parent="." instance=ExtResource("5_7ta6y")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 895.366, 145.291, 888.267)
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
[gd_resource type="Terrain3DTextureList" load_steps=7 format=3 uid="uid://d1j24k8sq8qpj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dwk8islw7ebab" path="res://maps/desert/assets/textures/rock029_alb_ht.png" id="1_v6d2c"]
|
||||
[ext_resource type="Texture2D" uid="uid://lgfhdcsb2ryx" path="res://maps/desert/assets/textures/rock029_nrm_rgh.png" id="2_06nlf"]
|
||||
[ext_resource type="Texture2D" uid="uid://cngjywcua4vv8" path="res://maps/desert/assets/textures/ground054_alb_ht.png" id="3_ik3f2"]
|
||||
[ext_resource type="Texture2D" uid="uid://cbk7l6hs0yrcc" path="res://maps/desert/assets/textures/ground054_nrm_rgh.png" id="4_waajq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwk8islw7ebab" path="res://src/maps/desert/assets/textures/rock029_alb_ht.png" id="1_onshe"]
|
||||
[ext_resource type="Texture2D" uid="uid://lgfhdcsb2ryx" path="res://src/maps/desert/assets/textures/rock029_nrm_rgh.png" id="2_ij8ws"]
|
||||
[ext_resource type="Texture2D" uid="uid://cngjywcua4vv8" path="res://src/maps/desert/assets/textures/ground054_alb_ht.png" id="3_1p8kc"]
|
||||
[ext_resource type="Texture2D" uid="uid://cbk7l6hs0yrcc" path="res://src/maps/desert/assets/textures/ground054_nrm_rgh.png" id="4_2trjt"]
|
||||
|
||||
[sub_resource type="Terrain3DTexture" id="Terrain3DTexture_wue72"]
|
||||
name = "Rock"
|
||||
albedo_color = Color(0.921569, 0.890196, 0.933333, 1)
|
||||
albedo_texture = ExtResource("1_v6d2c")
|
||||
normal_texture = ExtResource("2_06nlf")
|
||||
albedo_texture = ExtResource("1_onshe")
|
||||
normal_texture = ExtResource("2_ij8ws")
|
||||
uv_scale = 0.05
|
||||
|
||||
[sub_resource type="Terrain3DTexture" id="Terrain3DTexture_dkh73"]
|
||||
name = "Sand"
|
||||
texture_id = 1
|
||||
albedo_color = Color(0.792157, 0.72549, 0.694118, 1)
|
||||
albedo_texture = ExtResource("3_ik3f2")
|
||||
normal_texture = ExtResource("4_waajq")
|
||||
albedo_texture = ExtResource("3_1p8kc")
|
||||
normal_texture = ExtResource("4_2trjt")
|
||||
uv_scale = 0.15
|
||||
|
||||
[resource]
|
||||
|
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 3.1 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ddprscrpsofah"
|
||||
path.bptc="res://.godot/imported/ground037_alb_ht.png-b65037b7797c79d182d5e53b32e49a98.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/ground037_alb_ht.png-bc312da3f360ac157a805d559b911f89.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://maps/genesis/assets/textures/ground037_alb_ht.png"
|
||||
dest_files=["res://.godot/imported/ground037_alb_ht.png-b65037b7797c79d182d5e53b32e49a98.bptc.ctex"]
|
||||
source_file="res://src/maps/genesis/assets/textures/ground037_alb_ht.png"
|
||||
dest_files=["res://.godot/imported/ground037_alb_ht.png-bc312da3f360ac157a805d559b911f89.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 3.1 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c1ots7w6i0i1q"
|
||||
path.bptc="res://.godot/imported/ground037_nrm_rgh.png-9e25ec612e0ce15ff2c117ec4096a8f7.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/ground037_nrm_rgh.png-47815ab33f49f72c47be6bc5667c293e.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://maps/genesis/assets/textures/ground037_nrm_rgh.png"
|
||||
dest_files=["res://.godot/imported/ground037_nrm_rgh.png-9e25ec612e0ce15ff2c117ec4096a8f7.bptc.ctex"]
|
||||
source_file="res://src/maps/genesis/assets/textures/ground037_nrm_rgh.png"
|
||||
dest_files=["res://.godot/imported/ground037_nrm_rgh.png-47815ab33f49f72c47be6bc5667c293e.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://br7bfxcxh60df"
|
||||
path.bptc="res://.godot/imported/rock030_alb_ht.png-264f70712792662fedd23fe3bac9e221.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/rock030_alb_ht.png-583eaf004c4766531c057f7ac95cfacf.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://maps/genesis/assets/textures/rock030_alb_ht.png"
|
||||
dest_files=["res://.godot/imported/rock030_alb_ht.png-264f70712792662fedd23fe3bac9e221.bptc.ctex"]
|
||||
source_file="res://src/maps/genesis/assets/textures/rock030_alb_ht.png"
|
||||
dest_files=["res://.godot/imported/rock030_alb_ht.png-583eaf004c4766531c057f7ac95cfacf.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 3.1 MiB |
|
|
@ -3,7 +3,7 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cr72kjil43vgj"
|
||||
path.bptc="res://.godot/imported/rock030_nrm_rgh.png-ca17d43269b25394f8e7aa1fa0631681.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/rock030_nrm_rgh.png-a59624b7da8ac43f21d6bcbe47d5897c.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://maps/genesis/assets/textures/rock030_nrm_rgh.png"
|
||||
dest_files=["res://.godot/imported/rock030_nrm_rgh.png-ca17d43269b25394f8e7aa1fa0631681.bptc.ctex"]
|
||||
source_file="res://src/maps/genesis/assets/textures/rock030_nrm_rgh.png"
|
||||
dest_files=["res://.godot/imported/rock030_nrm_rgh.png-a59624b7da8ac43f21d6bcbe47d5897c.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://chbno00ugl6te"]
|
||||
|
||||
[ext_resource type="Terrain3DStorage" uid="uid://dyon4xda4k40d" path="res://maps/genesis/resources/storage.res" id="1_a88qe"]
|
||||
[ext_resource type="Terrain3DMaterial" uid="uid://bd4lr5sxu8xu" path="res://maps/genesis/resources/material.res" id="2_o2y3d"]
|
||||
[ext_resource type="Terrain3DTextureList" uid="uid://dnqa8kxgm3xuw" path="res://maps/genesis/resources/textures.res" id="3_1cww7"]
|
||||
[ext_resource type="Environment" uid="uid://d2ahijqqspw5f" path="res://maps/genesis/resources/env.tres" id="5_3klr3"]
|
||||
[ext_resource type="PackedScene" uid="uid://brux62vritay" path="res://entities/buildings/flag_stand.tscn" id="5_4kwtt"]
|
||||
[ext_resource type="Terrain3DStorage" uid="uid://dyon4xda4k40d" path="res://src/maps/genesis/resources/storage.res" id="1_a88qe"]
|
||||
[ext_resource type="Terrain3DMaterial" uid="uid://bd4lr5sxu8xu" path="res://src/maps/genesis/resources/material.res" id="2_o2y3d"]
|
||||
[ext_resource type="Terrain3DTextureList" uid="uid://dnqa8kxgm3xuw" path="res://src/maps/genesis/resources/textures.res" id="3_1cww7"]
|
||||
[ext_resource type="Environment" uid="uid://d2ahijqqspw5f" path="res://src/maps/genesis/resources/env.tres" id="5_3klr3"]
|
||||
[ext_resource type="PackedScene" uid="uid://brux62vritay" path="res://src/entities/buildings/flag_stand.tscn" id="5_4kwtt"]
|
||||
|
||||
[node name="Genesis" type="Terrain3D"]
|
||||
storage = ExtResource("1_a88qe")
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_resource type="Environment" load_steps=4 format=3 uid="uid://d2ahijqqspw5f"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://btdbu0qbe1646" path="res://environments/skyboxes/kloppenheim_06_puresky_2k.exr" id="1_k44rf"]
|
||||
[ext_resource type="Texture2D" uid="uid://btdbu0qbe1646" path="res://src/environments/skyboxes/kloppenheim_06_puresky_2k.exr" id="1_k44rf"]
|
||||
|
||||
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_7tawh"]
|
||||
panorama = ExtResource("1_k44rf")
|
||||