Sound effect when enemy dies

This commit is contained in:
Jean-André Santoni 2017-06-27 10:43:10 +02:00
parent 38aa8793b8
commit 06c520f47f
3 changed files with 2 additions and 0 deletions

BIN
assets/enemydie.wav Normal file

Binary file not shown.

View File

@ -64,6 +64,7 @@ function lutro.load()
sfx_throw = lutro.audio.newSource("assets/throw.wav")
sfx_gameover = lutro.audio.newSource("assets/gameover.wav")
sfx_enemyhit = lutro.audio.newSource("assets/enemyhit.wav")
sfx_enemydie = lutro.audio.newSource("assets/enemydie.wav")
end
function lutro.update(dt)

View File

@ -116,6 +116,7 @@ function obake:on_collide(e1, e2, dx, dy)
end
if self.hp <= 0 then
lutro.audio.play(sfx_enemydie)
self.die = 30
end
end