diff options
author | Aki <nthirtyone@gmail.com> | 2017-02-10 00:13:01 +0100 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-02-10 00:13:01 +0100 |
commit | 1a6b183f2b3457b62b7a403209bec6184c6c6106 (patch) | |
tree | 03b0c504c8fe15fd9315d4ef91d444a72000cd0a | |
parent | 7c37217f4bc21139b34fafd5cb140f483129a10c (diff) | |
download | roflnauts-1a6b183f2b3457b62b7a403209bec6184c6c6106.zip roflnauts-1a6b183f2b3457b62b7a403209bec6184c6c6106.tar.gz roflnauts-1a6b183f2b3457b62b7a403209bec6184c6c6106.tar.bz2 |
Cheer sound played on last naut being killed
-rw-r--r-- | assets/sounds/cheer.ogg | bin | 0 -> 62569 bytes | |||
-rw-r--r-- | player.lua | 4 | ||||
-rw-r--r-- | sounds.lua | 3 | ||||
-rw-r--r-- | world.lua | 1 |
4 files changed, 5 insertions, 3 deletions
diff --git a/assets/sounds/cheer.ogg b/assets/sounds/cheer.ogg Binary files differnew file mode 100644 index 0000000..69ae7dc --- /dev/null +++ b/assets/sounds/cheer.ogg @@ -439,8 +439,8 @@ function Player:respawn() end -- Sounds -function Player:playSound(sfx) - if self.alive then +function Player:playSound(sfx, force) + if self.alive or force then local source = love.audio.newSource(self.sfx[sfx]) source:play() end @@ -2,5 +2,6 @@ return { love.sound.newSoundData("assets/sounds/death.ogg"), love.sound.newSoundData("assets/sounds/hit.ogg"), love.sound.newSoundData("assets/sounds/land.ogg"), - love.sound.newSoundData("assets/sounds/attack.ogg") + love.sound.newSoundData("assets/sounds/attack.ogg"), + love.sound.newSoundData("assets/sounds/cheer.ogg") }
\ No newline at end of file @@ -216,6 +216,7 @@ function World:onNautKilled(naut) changeScene(Menu:new()) elseif #nauts < 2 then self.lastNaut = true + naut:playSound(5, true) end end |