From 1a6b183f2b3457b62b7a403209bec6184c6c6106 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 10 Feb 2017 00:13:01 +0100 Subject: Cheer sound played on last naut being killed --- assets/sounds/cheer.ogg | Bin 0 -> 62569 bytes player.lua | 4 ++-- sounds.lua | 3 ++- world.lua | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 assets/sounds/cheer.ogg diff --git a/assets/sounds/cheer.ogg b/assets/sounds/cheer.ogg new file mode 100644 index 0000000..69ae7dc Binary files /dev/null and b/assets/sounds/cheer.ogg differ diff --git a/player.lua b/player.lua index 6195da6..f08ca19 100644 --- a/player.lua +++ b/player.lua @@ -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 diff --git a/sounds.lua b/sounds.lua index 9c32d24..6c888e1 100644 --- a/sounds.lua +++ b/sounds.lua @@ -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 diff --git a/world.lua b/world.lua index 30359fd..f2af28d 100644 --- a/world.lua +++ b/world.lua @@ -216,6 +216,7 @@ function World:onNautKilled(naut) changeScene(Menu:new()) elseif #nauts < 2 then self.lastNaut = true + naut:playSound(5, true) end end -- cgit v1.1 From 21184b6b9e3441064960ebf5af910afa6c7ffd1e Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 10 Feb 2017 13:51:45 +0100 Subject: Added new sounds and modified old ones --- assets/sounds/attack.ogg | Bin 4487 -> 8288 bytes assets/sounds/death.ogg | Bin 12111 -> 20380 bytes assets/sounds/hit.ogg | Bin 5877 -> 7640 bytes assets/sounds/jump.ogg | Bin 0 -> 14436 bytes assets/sounds/land.ogg | Bin 4733 -> 0 bytes assets/sounds/spawn.ogg | Bin 0 -> 7302 bytes assets/sounds/step.ogg | Bin 0 -> 6363 bytes player.lua | 2 ++ sounds.lua | 6 ++++-- 9 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 assets/sounds/jump.ogg delete mode 100644 assets/sounds/land.ogg create mode 100644 assets/sounds/spawn.ogg create mode 100644 assets/sounds/step.ogg diff --git a/assets/sounds/attack.ogg b/assets/sounds/attack.ogg index c4e1123..5cae4f3 100644 Binary files a/assets/sounds/attack.ogg and b/assets/sounds/attack.ogg differ diff --git a/assets/sounds/death.ogg b/assets/sounds/death.ogg index 64c717f..dd4881d 100644 Binary files a/assets/sounds/death.ogg and b/assets/sounds/death.ogg differ diff --git a/assets/sounds/hit.ogg b/assets/sounds/hit.ogg index f44ad06..1e85257 100644 Binary files a/assets/sounds/hit.ogg and b/assets/sounds/hit.ogg differ diff --git a/assets/sounds/jump.ogg b/assets/sounds/jump.ogg new file mode 100644 index 0000000..4566031 Binary files /dev/null and b/assets/sounds/jump.ogg differ diff --git a/assets/sounds/land.ogg b/assets/sounds/land.ogg deleted file mode 100644 index 2804476..0000000 Binary files a/assets/sounds/land.ogg and /dev/null differ diff --git a/assets/sounds/spawn.ogg b/assets/sounds/spawn.ogg new file mode 100644 index 0000000..1becd40 Binary files /dev/null and b/assets/sounds/spawn.ogg differ diff --git a/assets/sounds/step.ogg b/assets/sounds/step.ogg new file mode 100644 index 0000000..73ee27f Binary files /dev/null and b/assets/sounds/step.ogg differ diff --git a/player.lua b/player.lua index f08ca19..5e75e68 100644 --- a/player.lua +++ b/player.lua @@ -205,6 +205,7 @@ function Player:controlpressed(set, action, key) if self.jumpnumber > 0 then -- General jump logics self.jumpactive = true + self:playSound(6) -- Spawn proper effect if not self.inAir then self:createEffect("jump") @@ -436,6 +437,7 @@ function Player:respawn() self.body:setPosition(self.world:getSpawnPosition()) self.body:setActive(true) self:createEffect("respawn") + self:playSound(7) end -- Sounds diff --git a/sounds.lua b/sounds.lua index 6c888e1..c30af16 100644 --- a/sounds.lua +++ b/sounds.lua @@ -1,7 +1,9 @@ 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/step.ogg"), love.sound.newSoundData("assets/sounds/attack.ogg"), - love.sound.newSoundData("assets/sounds/cheer.ogg") + love.sound.newSoundData("assets/sounds/cheer.ogg"), + love.sound.newSoundData("assets/sounds/jump.ogg"), + love.sound.newSoundData("assets/sounds/spawn.ogg"), } \ No newline at end of file -- cgit v1.1 From bdb3d0eff01fe0feb88a9c0b5a36fc052f40103d Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 10 Feb 2017 13:52:29 +0100 Subject: Changed respawn sound --- assets/sounds/spawn.ogg | Bin 7302 -> 10139 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/sounds/spawn.ogg b/assets/sounds/spawn.ogg index 1becd40..21f6292 100644 Binary files a/assets/sounds/spawn.ogg and b/assets/sounds/spawn.ogg differ -- cgit v1.1 From e476e889545480cb60f7c3a76bdb083cd8d35cd4 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 17 Feb 2017 16:56:38 +0100 Subject: New jump sound --- assets/sounds/jump.ogg | Bin 14436 -> 12978 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/sounds/jump.ogg b/assets/sounds/jump.ogg index 4566031..9555cbf 100644 Binary files a/assets/sounds/jump.ogg and b/assets/sounds/jump.ogg differ -- cgit v1.1 From 2b17be860806d1da209cb94b34790b61f1d93960 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 17 Feb 2017 17:03:27 +0100 Subject: Jump is still not good, sigh... --- assets/sounds/jump.ogg | Bin 12978 -> 9264 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/sounds/jump.ogg b/assets/sounds/jump.ogg index 9555cbf..e0a8f44 100644 Binary files a/assets/sounds/jump.ogg and b/assets/sounds/jump.ogg differ -- cgit v1.1 From 044313ea34209417f6f3837ff3b0402a8eeb7ed5 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 24 Feb 2017 22:53:19 +0100 Subject: Disabled jumping sound for now --- player.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player.lua b/player.lua index 5e75e68..775dd60 100644 --- a/player.lua +++ b/player.lua @@ -205,7 +205,7 @@ function Player:controlpressed(set, action, key) if self.jumpnumber > 0 then -- General jump logics self.jumpactive = true - self:playSound(6) + --self:playSound(6) -- Spawn proper effect if not self.inAir then self:createEffect("jump") -- cgit v1.1