summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-02-24 22:53:59 +0100
committerAki <nthirtyone@gmail.com>2017-02-24 22:53:59 +0100
commit5f013c9ca7b7c642a723befc1bafcd9f432f2956 (patch)
treeb58c7a8a22d0e9a9ef74fa11f3d11ba1b7ea6a8e
parent7c37217f4bc21139b34fafd5cb140f483129a10c (diff)
parent044313ea34209417f6f3837ff3b0402a8eeb7ed5 (diff)
downloadroflnauts-5f013c9ca7b7c642a723befc1bafcd9f432f2956.zip
roflnauts-5f013c9ca7b7c642a723befc1bafcd9f432f2956.tar.gz
roflnauts-5f013c9ca7b7c642a723befc1bafcd9f432f2956.tar.bz2
Merge branch 'sounds'v1.0-pre.5
-rw-r--r--assets/sounds/attack.oggbin4487 -> 8288 bytes
-rw-r--r--assets/sounds/cheer.oggbin0 -> 62569 bytes
-rw-r--r--assets/sounds/death.oggbin12111 -> 20380 bytes
-rw-r--r--assets/sounds/hit.oggbin5877 -> 7640 bytes
-rw-r--r--assets/sounds/jump.oggbin0 -> 9264 bytes
-rw-r--r--assets/sounds/land.oggbin4733 -> 0 bytes
-rw-r--r--assets/sounds/spawn.oggbin0 -> 10139 bytes
-rw-r--r--assets/sounds/step.oggbin0 -> 6363 bytes
-rw-r--r--player.lua6
-rw-r--r--sounds.lua7
-rw-r--r--world.lua1
11 files changed, 10 insertions, 4 deletions
diff --git a/assets/sounds/attack.ogg b/assets/sounds/attack.ogg
index c4e1123..5cae4f3 100644
--- a/assets/sounds/attack.ogg
+++ b/assets/sounds/attack.ogg
Binary files differ
diff --git a/assets/sounds/cheer.ogg b/assets/sounds/cheer.ogg
new file mode 100644
index 0000000..69ae7dc
--- /dev/null
+++ b/assets/sounds/cheer.ogg
Binary files differ
diff --git a/assets/sounds/death.ogg b/assets/sounds/death.ogg
index 64c717f..dd4881d 100644
--- a/assets/sounds/death.ogg
+++ b/assets/sounds/death.ogg
Binary files differ
diff --git a/assets/sounds/hit.ogg b/assets/sounds/hit.ogg
index f44ad06..1e85257 100644
--- a/assets/sounds/hit.ogg
+++ b/assets/sounds/hit.ogg
Binary files differ
diff --git a/assets/sounds/jump.ogg b/assets/sounds/jump.ogg
new file mode 100644
index 0000000..e0a8f44
--- /dev/null
+++ b/assets/sounds/jump.ogg
Binary files differ
diff --git a/assets/sounds/land.ogg b/assets/sounds/land.ogg
deleted file mode 100644
index 2804476..0000000
--- a/assets/sounds/land.ogg
+++ /dev/null
Binary files differ
diff --git a/assets/sounds/spawn.ogg b/assets/sounds/spawn.ogg
new file mode 100644
index 0000000..21f6292
--- /dev/null
+++ b/assets/sounds/spawn.ogg
Binary files differ
diff --git a/assets/sounds/step.ogg b/assets/sounds/step.ogg
new file mode 100644
index 0000000..73ee27f
--- /dev/null
+++ b/assets/sounds/step.ogg
Binary files differ
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
diff --git a/sounds.lua b/sounds.lua
index 9c32d24..c30af16 100644
--- a/sounds.lua
+++ b/sounds.lua
@@ -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
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