mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-16 08:55:33 +00:00
✨ Inventory, Weapons and refactoring
This commit is contained in:
parent
f43056d251
commit
6df677eda7
70 changed files with 1812 additions and 3895 deletions
BIN
entities/dummy_target/assets/player_mesh.glb
Normal file
BIN
entities/dummy_target/assets/player_mesh.glb
Normal file
Binary file not shown.
34
entities/dummy_target/assets/player_mesh.glb.import
Normal file
34
entities/dummy_target/assets/player_mesh.glb.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://chuein4frnvwt"
|
||||
path="res://.godot/imported/player_mesh.glb-8a1e1c6070971fc6184d85747185f28c.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/dummy_target/assets/player_mesh.glb"
|
||||
dest_files=["res://.godot/imported/player_mesh.glb-8a1e1c6070971fc6184d85747185f28c.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
33
entities/dummy_target/dummy_target.gd
Normal file
33
entities/dummy_target/dummy_target.gd
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# 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 DummyTarget extends RigidBody3D
|
||||
|
||||
@export var respawn_time := 0.0 # seconds
|
||||
|
||||
@onready var collision_shape_3d: CollisionShape3D = $CollisionShape3D
|
||||
|
||||
var start_pos : Vector3
|
||||
|
||||
func _ready() -> void:
|
||||
start_pos = global_position
|
||||
$TargetMesh/AnimationPlayer.play("gunTwoHanded")
|
||||
|
||||
func spawn(_killer_id : int) -> void:
|
||||
hide()
|
||||
collision_shape_3d.disabled = true
|
||||
await get_tree().create_timer(respawn_time).timeout
|
||||
global_position = start_pos
|
||||
show()
|
||||
collision_shape_3d.disabled = false
|
||||
68
entities/dummy_target/dummy_target.tscn
Normal file
68
entities/dummy_target/dummy_target.tscn
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://dpnu1lvfncx6q"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/dummy_target/dummy_target.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/dummy_target/assets/player_mesh.glb" id="4_fuync"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_b0142"]
|
||||
friction = 0.5
|
||||
bounce = 0.5
|
||||
|
||||
[node name="DummyTarget" type="RigidBody3D"]
|
||||
collision_layer = 2147483649
|
||||
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_b0142")
|
||||
center_of_mass_mode = 1
|
||||
center_of_mass = Vector3(0, 1, 0)
|
||||
continuous_cd = true
|
||||
script = ExtResource("1_iup5v")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
shape = ExtResource("2_i5k5j")
|
||||
|
||||
[node name="TargetMesh" parent="." instance=ExtResource("4_fuync")]
|
||||
transform = Transform3D(0.75, 0, 0, 0, 0.75, 0, 0, 0, 0.75, 0, 0, 0)
|
||||
|
||||
[node name="playerrig" parent="TargetMesh" index="2"]
|
||||
transform = Transform3D(2.56873e-07, 0, 1.31928, 0, 1.31928, 0, -1.31928, 0, 2.56873e-07, 0, 0, 0)
|
||||
|
||||
[node name="Skeleton3D" parent="TargetMesh/playerrig" index="0"]
|
||||
bones/6/rotation = Quaternion(-0.605155, -0.345862, -0.356135, 0.622363)
|
||||
bones/7/rotation = Quaternion(0.18188, 0.221628, -0.929157, 0.233384)
|
||||
bones/8/rotation = Quaternion(0.128862, -0.709864, -0.133277, 0.679504)
|
||||
bones/9/rotation = Quaternion(0.126866, -0.0346058, -0.00662176, 0.991294)
|
||||
bones/11/rotation = Quaternion(-0.0630718, -0.16283, 0.0971492, 0.979832)
|
||||
bones/13/rotation = Quaternion(0.0299552, -0.545663, -0.00259936, 0.837465)
|
||||
bones/14/rotation = Quaternion(-0.0636278, -0.0624373, 0.0299354, 0.995569)
|
||||
bones/17/rotation = Quaternion(0.0486079, -0.0407852, 0.014286, 0.997883)
|
||||
bones/19/rotation = Quaternion(-0.12453, -0.526036, 0.129609, 0.831252)
|
||||
bones/20/rotation = Quaternion(-0.0225172, -0.0668488, 0.0231689, 0.99724)
|
||||
bones/21/rotation = Quaternion(-0.00114936, 0.0252308, -0.0174874, 0.999528)
|
||||
bones/25/rotation = Quaternion(-0.608395, 0.196282, 0.258426, 0.724254)
|
||||
bones/26/rotation = Quaternion(0.161981, -0.321612, 0.619315, 0.697694)
|
||||
bones/27/rotation = Quaternion(0.426391, 0.0868582, 0.53013, 0.727742)
|
||||
bones/28/rotation = Quaternion(-0.217102, 0.0422089, 0.0230506, 0.974963)
|
||||
bones/33/rotation = Quaternion(-0.0636278, 0.0624373, -0.0299354, 0.995569)
|
||||
bones/36/rotation = Quaternion(-0.4266, 0.0977703, 0.332942, 0.835226)
|
||||
bones/37/rotation = Quaternion(-0.632018, -0.129105, 0.241206, 0.725055)
|
||||
bones/39/rotation = Quaternion(-0.479327, 0.030236, 0.338389, 0.809212)
|
||||
bones/40/rotation = Quaternion(-0.540176, -0.0581251, 0.395197, 0.740709)
|
||||
bones/42/rotation = Quaternion(-0.451682, -0.0170105, 0.326969, 0.829931)
|
||||
bones/43/rotation = Quaternion(-0.512965, -0.0942157, 0.391943, 0.757873)
|
||||
bones/44/rotation = Quaternion(0.986515, -3.3762e-16, 1.34771e-25, 0.163672)
|
||||
bones/46/rotation = Quaternion(-0.574131, 2.92207e-06, -4.58343e-06, 0.818763)
|
||||
bones/49/rotation = Quaternion(0.986515, -3.3762e-16, 1.34771e-25, 0.163672)
|
||||
bones/51/rotation = Quaternion(-0.574131, -2.92207e-06, 4.58343e-06, 0.818763)
|
||||
|
||||
[node name="AnimationPlayer" parent="TargetMesh" index="4"]
|
||||
autoplay = "gunTwoHanded"
|
||||
|
||||
[node name="Marker3D" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
|
||||
[editable path="TargetMesh"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue