From ad6f0b6ed7aca98f97710ea73bb85f797d2c07b2 Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Sat, 5 Dec 2015 17:56:13 +0100 Subject: [PATCH] SoundLoader --- code/GameLib.js | 57 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/code/GameLib.js b/code/GameLib.js index f95180e..e1892a1 100644 --- a/code/GameLib.js +++ b/code/GameLib.js @@ -316,7 +316,7 @@ Mouse.prototype = { // // ImageLoader // -var ImageLoader = function(imageList, funcOnLoad){ +var ImageLoader = function(){ this.Images = {}; }; ImageLoader.prototype = { @@ -372,3 +372,58 @@ ImageLoader.prototype = { }, Debug: false }; + + +///////////////////////////////////////// +// +// SoundLoader +// +var SoundLoader = function(){ + this.Sounds = {}; +}; +SoundLoader.prototype = { + LoadSounds: function(soundsList, funcOnLoad){ + this.SoundsCount = soundsList.length; + this.FuncOnLoad = funcOnLoad; + + var i,n; + for(i=0,n=soundsList.length;i