summaryrefslogtreecommitdiffhomepage
path: root/player.lua
diff options
context:
space:
mode:
Diffstat (limited to 'player.lua')
-rw-r--r--player.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/player.lua b/player.lua
index 6195da6..775dd60 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,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