Weapon sounds

This commit is contained in:
Marco 2025-09-11 10:54:02 +02:00
commit 280af2fcfa
7 changed files with 158 additions and 188 deletions

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=3 uid="uid://cfgc6ik8vb08c"]
[gd_scene load_steps=4 format=3 uid="uid://cfgc6ik8vb08c"]
[ext_resource type="Script" uid="uid://dutroqc0grqyv" path="res://Scripts/Weapons/Weapon3D.cs" id="1_gdxml"]
[ext_resource type="Texture2D" uid="uid://duwiasewxvcb5" path="res://Sprites/Items/Icicle_Gun.png" id="3_6jcxd"]
[ext_resource type="Script" uid="uid://cqwi5bt8mxykn" path="res://Scripts/Weapons/WeaponSoundModule3D.cs" id="3_s6td3"]
[node name="Weapon" type="Node3D" node_paths=PackedStringArray("Muzzle", "Pivot", "Sprite")]
script = ExtResource("1_gdxml")
@ -22,3 +23,19 @@ pixel_size = 0.05
billboard = 1
texture_filter = 0
texture = ExtResource("3_6jcxd")
[node name="SoundModule" type="Node" parent="." node_paths=PackedStringArray("Weapon", "ShootSound", "ReloadSound", "EmptySound")]
script = ExtResource("3_s6td3")
Weapon = NodePath("..")
ShootSound = NodePath("ShootSound")
ReloadSound = NodePath("ReloadSound")
EmptySound = NodePath("EmptySound")
[node name="ShootSound" type="AudioStreamPlayer3D" parent="SoundModule"]
bus = &"Effects"
[node name="ReloadSound" type="AudioStreamPlayer3D" parent="SoundModule"]
bus = &"Effects"
[node name="EmptySound" type="AudioStreamPlayer3D" parent="SoundModule"]
bus = &"Effects"