diff options
-rw-r--r-- | assets/sounds/attack.ogg | bin | 4487 -> 8288 bytes | |||
-rw-r--r-- | assets/sounds/cheer.ogg | bin | 0 -> 62569 bytes | |||
-rw-r--r-- | assets/sounds/death.ogg | bin | 12111 -> 20380 bytes | |||
-rw-r--r-- | assets/sounds/hit.ogg | bin | 5877 -> 7640 bytes | |||
-rw-r--r-- | assets/sounds/jump.ogg | bin | 0 -> 9264 bytes | |||
-rw-r--r-- | assets/sounds/land.ogg | bin | 4733 -> 0 bytes | |||
-rw-r--r-- | assets/sounds/spawn.ogg | bin | 0 -> 10139 bytes | |||
-rw-r--r-- | assets/sounds/step.ogg | bin | 0 -> 6363 bytes | |||
-rw-r--r-- | player.lua | 6 | ||||
-rw-r--r-- | sounds.lua | 7 | ||||
-rw-r--r-- | world.lua | 1 |
11 files changed, 10 insertions, 4 deletions
diff --git a/assets/sounds/attack.ogg b/assets/sounds/attack.ogg Binary files differindex c4e1123..5cae4f3 100644 --- a/assets/sounds/attack.ogg +++ b/assets/sounds/attack.ogg 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 diff --git a/assets/sounds/death.ogg b/assets/sounds/death.ogg Binary files differindex 64c717f..dd4881d 100644 --- a/assets/sounds/death.ogg +++ b/assets/sounds/death.ogg diff --git a/assets/sounds/hit.ogg b/assets/sounds/hit.ogg Binary files differindex f44ad06..1e85257 100644 --- a/assets/sounds/hit.ogg +++ b/assets/sounds/hit.ogg diff --git a/assets/sounds/jump.ogg b/assets/sounds/jump.ogg Binary files differnew file mode 100644 index 0000000..e0a8f44 --- /dev/null +++ b/assets/sounds/jump.ogg diff --git a/assets/sounds/land.ogg b/assets/sounds/land.ogg Binary files differdeleted file mode 100644 index 2804476..0000000 --- a/assets/sounds/land.ogg +++ /dev/null diff --git a/assets/sounds/spawn.ogg b/assets/sounds/spawn.ogg Binary files differnew file mode 100644 index 0000000..21f6292 --- /dev/null +++ b/assets/sounds/spawn.ogg diff --git a/assets/sounds/step.ogg b/assets/sounds/step.ogg Binary files differnew file mode 100644 index 0000000..73ee27f --- /dev/null +++ b/assets/sounds/step.ogg @@ -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,11 +437,12 @@ function Player:respawn() self.body:setPosition(self.world:getSpawnPosition()) self.body:setActive(true) self:createEffect("respawn") + self:playSound(7) 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 @@ -1,6 +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/attack.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/jump.ogg"), + love.sound.newSoundData("assets/sounds/spawn.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 |