diff --git a/audio/bg_music.mp3 b/audio/bg_music.mp3 new file mode 100644 index 0000000..1ee4665 Binary files /dev/null and b/audio/bg_music.mp3 differ diff --git a/audio/bg_music.ogg b/audio/bg_music.ogg index 060c1a3..a2a1a53 100755 Binary files a/audio/bg_music.ogg and b/audio/bg_music.ogg differ diff --git a/audio/game-over.mp3 b/audio/game-over.mp3 new file mode 100644 index 0000000..9a694ac Binary files /dev/null and b/audio/game-over.mp3 differ diff --git a/audio/game-over.ogg b/audio/game-over.ogg new file mode 100755 index 0000000..91031d4 Binary files /dev/null and b/audio/game-over.ogg differ diff --git a/index.html b/index.html index ac127c9..fef4df7 100644 --- a/index.html +++ b/index.html @@ -73,7 +73,7 @@ diff --git a/js/main.js b/js/main.js index 6dc90fb..9eec63d 100644 --- a/js/main.js +++ b/js/main.js @@ -97,6 +97,9 @@ jQuery(document).ready(function() { $('#game-over:hidden').fadeIn(500) ; $('#ground, #ship').fadeTo(500, 0.2) ; + // -- Play Sound + soundManager.play('gameOver') ; + // -- Stop loopAnimation if ( timers.loopGame ) clearInterval(timers.loopGame) ; diff --git a/js/sounds.load.js b/js/sounds.load.js index 5ed812c..5f29ffd 100644 --- a/js/sounds.load.js +++ b/js/sounds.load.js @@ -5,7 +5,7 @@ soundManager.useFlashBlock = false; soundManager.bgColor = '#ffffff'; soundManager.debugMode = false; - soundManager.url = 'http://patator.socialmixmedia.fr/assets/js/soundmanager/swf/'; + soundManager.url = 'js/libs/soundmanager/swf/'; soundManager.wmode = 'transparent'; // hide initial flash of white on everything except firefox/win32 soundManager.allowScriptAccess = 'always'; soundManager.useFastPolling = true; @@ -40,7 +40,7 @@ soundManager.createSound({ id: 'click', url: 'audio/click.ogg', - autoLoad: true, + autoLoad: false, autoPlay: false, multiShot: false, volume: 50 @@ -50,7 +50,7 @@ soundManager.createSound({ id: 'shoot', url: 'audio/big_laser.ogg', - autoLoad: true, + autoLoad: false, autoPlay: false, multiShot: true, volume: 30 @@ -60,12 +60,23 @@ soundManager.createSound({ id: 'explode', url: 'audio/explode.ogg', - autoLoad: true, + autoLoad: false, autoPlay: false, multiShot: true, volume: 10 }); + // -- Game Over + soundManager.createSound({ + id: 'gameOver', + url: 'audio/game-over.ogg', + autoLoad: false, + autoPlay: false, + multiShot: true, + volume: 10 + }); + + }); soundManager.ontimeout(function() {