We will add a sound that will be played when the character jumps.
character.lua and add a call to
function Character:jump ( keyDown ) if keyDown and not self.jumping then AudioManager:play ( 'jump' ) self.physics.body:applyForce ( 0, 8000 ) self.jumping = true self:startAnimation ( 'jump' ) end end
That's it. Run it and listen to your jump.