diff --git a/Game/Assets/Weapons/Handgun/Handgun.gltf.import b/Game/Assets/Weapons/Handgun/Handgun.gltf.import index 28aae28..76c455b 100644 --- a/Game/Assets/Weapons/Handgun/Handgun.gltf.import +++ b/Game/Assets/Weapons/Handgun/Handgun.gltf.import @@ -3,7 +3,7 @@ importer="scene" importer_version=1 type="PackedScene" -uid="uid://bci2qnohg76xa" +uid="uid://2h6xvopq206h" path="res://.godot/imported/Handgun.gltf-dfc6de5a6d72ba5ef43f43a4cd2ab91e.scn" [deps] @@ -23,7 +23,6 @@ meshes/light_baking=2 meshes/lightmap_texel_size=0.1 skins/use_named_skins=true animation/import=true -animation/bake_reset_animation=true animation/fps=15 import_script/path="" _subresources={ diff --git a/Game/Assets/Weapons/Weapon.gd b/Game/Assets/Weapons/Weapon.gd index f7a85ef..8bd4f09 100644 --- a/Game/Assets/Weapons/Weapon.gd +++ b/Game/Assets/Weapons/Weapon.gd @@ -37,9 +37,9 @@ var spread = spread_min var ray = space_state.intersect_ray(from, to, [player]) - $"Handgun/SFX/Shoot A".play() - $"Handgun/SFX/Shoot B".play() - $"Handgun/SFX/Shoot C".play() + $"SFX/Shoot A".play() + $"SFX/Shoot B".play() + $"SFX/Shoot C".play() $Handgun/AnimationPlayer.play("Shoot", 0, 2.5) @@ -142,4 +142,4 @@ func trigger(index: int, active: bool) -> void: # Called when the node enters the scene tree for the first time. func _ready(): # align the sound source with the head to produce balanced stereo - pass #$Handgun/SFX/Shoot.global_transform = camera.global_transform + pass #$SFX/Shoot.global_transform = camera.global_transform diff --git a/Game/Assets/Weapons/Weapon.tscn b/Game/Assets/Weapons/Weapon.tscn index e26f775..d935ddf 100644 --- a/Game/Assets/Weapons/Weapon.tscn +++ b/Game/Assets/Weapons/Weapon.tscn @@ -1,98 +1,53 @@ -[gd_scene load_steps=8 format=3 uid="uid://bemrov0tiy08n"] +[gd_scene load_steps=7 format=3 uid="uid://bemrov0tiy08n"] -[ext_resource type="PackedScene" uid="uid://bci2qnohg76xa" path="res://Assets/Weapons/Handgun/Handgun.gltf" id="1"] +[ext_resource type="PackedScene" uid="uid://2h6xvopq206h" path="res://Assets/Weapons/Handgun/Handgun.gltf" id="1"] [ext_resource type="Script" path="res://Assets/Weapons/Weapon.gd" id="2"] [ext_resource type="PackedScene" uid="uid://c5cwnfuw4go1b" path="res://Assets/Audio/SoundPlayer.tscn" id="3_q0xp7"] [ext_resource type="AudioStream" uid="uid://cw01fxbftb6m2" path="res://Assets/SFX/Weapons_Handgun_Shot_01_B.wav" id="4_4ao2c"] [ext_resource type="AudioStream" uid="uid://citsx20hcjj8i" path="res://Assets/SFX/Weapons_Handgun_Shot_01_A.wav" id="4_p0b4f"] [ext_resource type="AudioStream" uid="uid://cxiy7p6qd7hyh" path="res://Assets/SFX/Weapons_Handgun_Shot_01_C.wav" id="6_w1k4v"] -[sub_resource type="Animation" id="1"] -resource_name = "Default" -length = 0.433333 -tracks/0/type = "transform" -tracks/0/path = NodePath("Handgun_Armature/Skeleton3D:Slide") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = PackedFloat32Array(0, 1, 0, 0, 0, 7.10543e-15, -5.04871e-29, -7.10543e-15, 1, 1, 1, 1, 0.0666667, 1, 0, -0.0742494, 0, 7.10543e-15, -5.04871e-29, -7.10543e-15, 1, 1, 1, 1, 0.133333, 1, 0, -0.0638517, -7.45058e-09, 4.61853e-14, -3.28166e-28, -7.10543e-15, 1, 1, 1, 1, 0.266667, 1, -1.49012e-08, -0.0154906, -7.45058e-09, 4.9738e-14, -1.06023e-27, -2.13163e-14, 1, 1, 1, 1, 0.333333, 1, -1.49012e-08, -0.000740513, -7.45058e-09, 7.10543e-15, -5.04871e-29, -7.10543e-15, 1, 1, 1, 1, 0.4, 1, 0, 0, 0, 7.10543e-15, -5.04871e-29, -7.10543e-15, 1, 1, 1, 1, 0.433333, 1, 0, 0, 0, 7.10543e-15, -5.04871e-29, -7.10543e-15, 1, 1, 1, 1) -tracks/1/type = "transform" -tracks/1/path = NodePath("Handgun_Armature/Skeleton3D:Clip") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/keys = PackedFloat32Array(0, 1, 0, 0, 0, -1.49012e-08, 7.45058e-09, -7.45058e-09, 1, 1, 1, 1, 0.433333, 1, 0, 0, 0, -1.49012e-08, 7.45058e-09, -7.45058e-09, 1, 1, 1, 1) -tracks/2/type = "transform" -tracks/2/path = NodePath("Handgun_Armature/Skeleton3D:Root") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/keys = PackedFloat32Array(0, 1, 0, 0, 0, 0, -2.52435e-29, 7.10543e-15, 1, 1, 1, 1, 0.0666667, 1, 0.00131352, 0.00153854, -0.00218139, 0.0163412, 1.22913e-08, 0.00983989, 0.999818, 1, 1, 1, 0.133333, 1, 0.00476759, 0.00558436, -0.00791762, 0.0593126, 5.85811e-08, 0.0357152, 0.9976, 1, 1, 1, 0.2, 1, 0.00591084, 0.00692347, -0.00981623, 0.0734948, 2.37198e-08, 0.0442549, 0.996313, 1, 1, 1, 0.333333, 1, 0.00017027, 0.000199437, -0.000282773, 0.00211715, 6.15582e-08, 0.00127486, 0.999997, 1, 1, 1, 0.4, 1, 0, 0, 0, 0, -2.52435e-29, 7.10543e-15, 1, 1, 1, 1, 0.433333, 1, 0, 0, 0, 0, -2.52435e-29, 7.10543e-15, 1, 1, 1, 1) - [node name="Weapon" type="Node3D"] script = ExtResource( "2" ) [node name="Handgun" parent="." instance=ExtResource( "1" )] -[node name="Ejector" parent="Handgun" index="1"] -transform = Transform3D(0.111956, -0.239423, -0.964439, 0.710515, 0.697806, -0.0907515, 0.694719, -0.675088, 0.248237, -0.0309456, 0.118711, -0.00737097) - -[node name="Skeleton3D" parent="Handgun/Handgun_Armature" index="0"] -bones/0/pose = Transform3D(1, -1.42109e-14, -5.04871e-29, 1.42109e-14, 1, -3.58732e-43, 5.04871e-29, -3.58732e-43, 1, 0, 0, 0) -bones/1/pose = Transform3D(1, 1.42109e-14, -2.01948e-28, -1.42109e-14, 1, -1.42109e-14, 0, 1.42109e-14, 1, 0, 0, 0) -bones/2/pose = Transform3D(1, 1.49012e-08, 1.49012e-08, -1.49012e-08, 1, 2.98023e-08, -1.49012e-08, -2.98023e-08, 1, 0, 0, 0) - -[node name="Static" parent="Handgun/Handgun_Armature/Skeleton3D" index="0"] -layers = 2 - -[node name="Hand" parent="Handgun/HandArmature/Skeleton3D2" index="0"] -layers = 2 - -[node name="AnimationPlayer" parent="Handgun" index="4"] -autoplay = "Default" -anims/Default = SubResource( "1" ) -blend_times = [] - -[node name="SFX" type="Node3D" parent="Handgun"] +[node name="SFX" type="Node3D" parent="."] script = null -[node name="Shoot A" parent="Handgun/SFX" instance=ExtResource( "3_q0xp7" )] +[node name="Shoot A" parent="SFX" instance=ExtResource( "3_q0xp7" )] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0168038, 0.251726, 0.250185) SoundClip = "res://Assets/SFX/Weapons_HandgunShot_01.wav" Voice_Count = 2 -[node name="AudioStreamPlayer3D" parent="Handgun/SFX/Shoot A" index="0"] +[node name="AudioStreamPlayer3D" parent="SFX/Shoot A" index="0"] stream = ExtResource( "4_p0b4f" ) unit_db = 8.0 unit_size = 1.0 max_db = 6.0 -[node name="Shoot B" parent="Handgun/SFX" instance=ExtResource( "3_q0xp7" )] +[node name="Shoot B" parent="SFX" instance=ExtResource( "3_q0xp7" )] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0168038, 0.251726, 0.250185) SoundClip = "res://Assets/SFX/Weapons_HandgunShot_01.wav" Voice_Count = 2 -[node name="AudioStreamPlayer3D" parent="Handgun/SFX/Shoot B" index="0"] +[node name="AudioStreamPlayer3D" parent="SFX/Shoot B" index="0"] stream = ExtResource( "4_4ao2c" ) unit_db = 4.0 unit_size = 8.0 max_db = 6.0 -[node name="Shoot C" parent="Handgun/SFX" instance=ExtResource( "3_q0xp7" )] +[node name="Shoot C" parent="SFX" instance=ExtResource( "3_q0xp7" )] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0168038, 0.251726, 0.250185) SoundClip = "res://Assets/SFX/Weapons_HandgunShot_01.wav" Voice_Count = 2 -[node name="AudioStreamPlayer3D" parent="Handgun/SFX/Shoot C" index="0"] +[node name="AudioStreamPlayer3D" parent="SFX/Shoot C" index="0"] stream = ExtResource( "6_w1k4v" ) unit_db = 4.0 unit_size = 16.0 max_db = 4.0 -[editable path="Handgun"] -[editable path="Handgun/SFX/Shoot A"] -[editable path="Handgun/SFX/Shoot B"] -[editable path="Handgun/SFX/Shoot C"] +[editable path="SFX/Shoot A"] +[editable path="SFX/Shoot B"] +[editable path="SFX/Shoot C"]