From 75c072db5dac84e5f1fb59ea6676672a0cbf6b43 Mon Sep 17 00:00:00 2001 From: Ruslan Ignatov Date: Mon, 29 Dec 2025 23:21:13 +0300 Subject: [PATCH] Added gatling shot sound --- .../gatling/abstract_gatling_weapon.gd | 1 + game/managers/sound_manager.gd | 4 ++++ game/managers/sound_manager.tscn | 4 +++- sound/sfx/weapon/gatling_shot.wav | 3 +++ sound/sfx/weapon/gatling_shot.wav.import | 24 +++++++++++++++++++ 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 sound/sfx/weapon/gatling_shot.wav create mode 100644 sound/sfx/weapon/gatling_shot.wav.import diff --git a/game/entities/weapons/gatling/abstract_gatling_weapon.gd b/game/entities/weapons/gatling/abstract_gatling_weapon.gd index 5ffc654..0d2b8b8 100644 --- a/game/entities/weapons/gatling/abstract_gatling_weapon.gd +++ b/game/entities/weapons/gatling/abstract_gatling_weapon.gd @@ -15,6 +15,7 @@ func shoot(ship_velocity: Vector2) -> bool: var is_shot := super.shoot(ship_velocity) if is_shot: _can_shoot = false + SoundManager.play_sfx_stream(SoundManager.sfx_weapon_gatling_shot, global_position) sprite.play(SHOT_ANIMATION) shot_particles.restart() shell_particles.emit_particle(Transform2D(), Vector2(), Color(), Color(), 0) diff --git a/game/managers/sound_manager.gd b/game/managers/sound_manager.gd index 0e2173a..6a1093b 100644 --- a/game/managers/sound_manager.gd +++ b/game/managers/sound_manager.gd @@ -24,6 +24,10 @@ const MUSIC_BUS = "Music" @export var ui_stream_next : AudioStream @export var ui_stream_previous : AudioStream +@export_group("SFX Sounds", "sfx") +@export_subgroup("Weapon", "sfx_weapon") +@export var sfx_weapon_gatling_shot : AudioStream + var _ui_players : Array[AudioStreamPlayer] = [] var _sfx_players : Array[AudioStreamPlayer2D] = [] diff --git a/game/managers/sound_manager.tscn b/game/managers/sound_manager.tscn index c233474..e443950 100644 --- a/game/managers/sound_manager.tscn +++ b/game/managers/sound_manager.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=3 uid="uid://bc0np3ldfspq4"] +[gd_scene load_steps=7 format=3 uid="uid://bc0np3ldfspq4"] [ext_resource type="Script" uid="uid://cx5qcukr66whc" path="res://game/managers/sound_manager.gd" id="1_cg0sy"] [ext_resource type="AudioStream" uid="uid://bqcqigmj23ub5" path="res://sound/ui/ui_accept.wav" id="2_agyxs"] [ext_resource type="AudioStream" uid="uid://buo5vn18yd5w0" path="res://sound/ui/ui_decline.wav" id="3_0i6kl"] [ext_resource type="AudioStream" uid="uid://bmlticluh8uqd" path="res://sound/ui/ui_next.wav" id="4_fpnh3"] [ext_resource type="AudioStream" uid="uid://bm1qd04yh32i8" path="res://sound/ui/ui_previous.wav" id="5_22ptj"] +[ext_resource type="AudioStream" uid="uid://vbk40x6ifoyv" path="res://sound/sfx/weapon/gatling_shot.wav" id="6_0i6kl"] [node name="SoundManager" type="Node"] script = ExtResource("1_cg0sy") @@ -18,3 +19,4 @@ ui_stream_accept = ExtResource("2_agyxs") ui_stream_decline = ExtResource("3_0i6kl") ui_stream_next = ExtResource("4_fpnh3") ui_stream_previous = ExtResource("5_22ptj") +sfx_weapon_gatling_shot = ExtResource("6_0i6kl") diff --git a/sound/sfx/weapon/gatling_shot.wav b/sound/sfx/weapon/gatling_shot.wav new file mode 100644 index 0000000..9d2c8f4 --- /dev/null +++ b/sound/sfx/weapon/gatling_shot.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6c49e7a60249d9cd2b01103ff99ab3dabee5ea5688dfaba40c499765a9c993b +size 29148 diff --git a/sound/sfx/weapon/gatling_shot.wav.import b/sound/sfx/weapon/gatling_shot.wav.import new file mode 100644 index 0000000..def8000 --- /dev/null +++ b/sound/sfx/weapon/gatling_shot.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://vbk40x6ifoyv" +path="res://.godot/imported/gatling_shot.wav-eaed826b6e3c5391b89457736d107ff6.sample" + +[deps] + +source_file="res://sound/sfx/weapon/gatling_shot.wav" +dest_files=["res://.godot/imported/gatling_shot.wav-eaed826b6e3c5391b89457736d107ff6.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2