diff options
Diffstat (limited to 'player.lua')
-rw-r--r-- | player.lua | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |