From e61ba8cc576465f2c01283bfad1c0eb452e34769 Mon Sep 17 00:00:00 2001 From: arngo <27396817+arngo@users.noreply.github.com> Date: Sun, 26 Dec 2021 23:04:51 -0500 Subject: add shooting sounds --- app/systems/player_weapon.rb | 1 + sounds/shoot.mp3 | Bin 0 -> 40750 bytes 2 files changed, 1 insertion(+) create mode 100644 sounds/shoot.mp3 diff --git a/app/systems/player_weapon.rb b/app/systems/player_weapon.rb index 9cb4df0..e16570c 100644 --- a/app/systems/player_weapon.rb +++ b/app/systems/player_weapon.rb @@ -13,6 +13,7 @@ FF::Scn::BoidRules.add( bullet = Factory::Bullet.new(damage: weapon.damage, vx: (boid.vx/mag) * weapon.speed, vy: (boid.vy/mag) * weapon.speed, x: boid.x, y: boid.y) bullet.remove(bullet.components[FF::Cmp::Team][0]) bullet.add(FF::Cmp::Team.new(team: 'player')) + $gtk.args.gtk.queue_sound "sounds/shoot.mp3" end end end diff --git a/sounds/shoot.mp3 b/sounds/shoot.mp3 new file mode 100644 index 0000000..33be5cd Binary files /dev/null and b/sounds/shoot.mp3 differ -- cgit v1.2.3