mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-18 00:53:48 +00:00
Weapon sounds
This commit is contained in:
parent
22a1ec5ba2
commit
3c531bbe04
14 changed files with 174 additions and 52 deletions
|
|
@ -1,6 +1,7 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://crry0rgk7a8sm"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://crry0rgk7a8sm"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://2ji3nxqbq577" path="res://Scripts/Weapon.cs" id="1_f5iec"]
|
||||
[ext_resource type="Script" uid="uid://dw7nwfbws3op4" path="res://Scripts/Weapons/WeaponSoundModule.cs" id="2_uwnyl"]
|
||||
|
||||
[node name="Weapon" type="Sprite2D" node_paths=PackedStringArray("Muzzle")]
|
||||
script = ExtResource("1_f5iec")
|
||||
|
|
@ -10,3 +11,22 @@ Muzzle = NodePath("Muzzle")
|
|||
|
||||
[node name="ShootTimer" type="Timer" parent="."]
|
||||
one_shot = true
|
||||
|
||||
[node name="SoundModule" type="Node2D" parent="." node_paths=PackedStringArray("Weapon", "ShootSound", "ReloadSound", "EmptySound")]
|
||||
script = ExtResource("2_uwnyl")
|
||||
Weapon = NodePath("..")
|
||||
ShootSound = NodePath("ShootSound")
|
||||
ReloadSound = NodePath("ReloadSound")
|
||||
EmptySound = NodePath("EmptySound")
|
||||
|
||||
[node name="ShootSound" type="AudioStreamPlayer2D" parent="SoundModule"]
|
||||
bus = &"Effects"
|
||||
area_mask = 2
|
||||
|
||||
[node name="ReloadSound" type="AudioStreamPlayer2D" parent="SoundModule"]
|
||||
|
||||
[node name="EmptySound" type="AudioStreamPlayer2D" parent="SoundModule"]
|
||||
|
||||
[connection signal="Empty" from="." to="SoundModule" method="PlayEmptySound"]
|
||||
[connection signal="Reloading" from="." to="SoundModule" method="PlayReloadSound"]
|
||||
[connection signal="Shooting" from="." to="SoundModule" method="PlayShootSound"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue