src/core/AssetManager.js
/**
	* Loads all audios from the backend.
	*
	* @return {AssetManager} A reference to this asset manager.
	*/
Loads all audios from the backend.
@return {AssetManager} A reference to this asset manager.
Loads all audios from the backend . @return { AssetManager } A reference to this asset manager .
_loadAudios() {
		const audioLoader = this.audioLoader;
		const audios = this.audios;
		const listener = this.listener;
		const blasterShot = new PositionalAudio( listener );
		blasterShot.matrixAutoUpdate = false;
		const shotgunShot = new PositionalAudio( listener );
		shotgunShot.matrixAutoUpdate = false;
		const assaultRifleShot = new PositionalAudio( listener );
		assaultRifleShot.matrixAutoUpdate = false;
		const reload = new PositionalAudio( listener );
		reload.matrixAutoUpdate = false;
		const shotgunShotReload = new PositionalAudio( listener );
		shotgunShotReload.matrixAutoUpdate = false;
		const step1 = new PositionalAudio( listener );
		step1.matrixAutoUpdate = false;
		const step2 = new PositionalAudio( listener );
		step2.matrixAutoUpdate = false;
		const impact1 = new PositionalAudio( listener );
		impact1.setVolume( CONFIG.AUDIO.VOLUME_IMPACT );
		impact1.matrixAutoUpdate = false;
		const impact2 = new PositionalAudio( listener );
		impact2.setVolume( CONFIG.AUDIO.VOLUME_IMPACT );
		impact2.matrixAutoUpdate = false;
		const impact3 = new PositionalAudio( listener );
		impact3.setVolume( CONFIG.AUDIO.VOLUME_IMPACT );
		impact3.matrixAutoUpdate = false;
		const impact4 = new PositionalAudio( listener );
		impact4.setVolume( CONFIG.AUDIO.VOLUME_IMPACT );
		impact4.matrixAutoUpdate = false;
		const impact5 = new PositionalAudio( listener );
		impact5.setVolume( CONFIG.AUDIO.VOLUME_IMPACT );
		impact5.matrixAutoUpdate = false;
		const impact6 = new PositionalAudio( listener );
		impact6.setVolume( CONFIG.AUDIO.VOLUME_IMPACT );
		impact6.matrixAutoUpdate = false;
		const impact7 = new PositionalAudio( listener );
		impact7.setVolume( CONFIG.AUDIO.VOLUME_IMPACT );
		impact7.matrixAutoUpdate = false;
		const health = new PositionalAudio( listener );
		health.matrixAutoUpdate = false;
		const ammo = new PositionalAudio( listener );
		ammo.matrixAutoUpdate = false;
		audioLoader.load( './audios/blaster_shot.ogg', buffer => blasterShot.setBuffer( buffer ) );
		audioLoader.load( './audios/shotgun_shot.ogg', buffer => shotgunShot.setBuffer( buffer ) );
		audioLoader.load( './audios/assault_rifle_shot.ogg', buffer => assaultRifleShot.setBuffer( buffer ) );
		audioLoader.load( './audios/reload.ogg', buffer => reload.setBuffer( buffer ) );
		audioLoader.load( './audios/shotgun_shot_reload.ogg', buffer => shotgunShotReload.setBuffer( buffer ) );
		audioLoader.load( './audios/step1.ogg', buffer => step1.setBuffer( buffer ) );
		audioLoader.load( './audios/step2.ogg', buffer => step2.setBuffer( buffer ) );
		audioLoader.load( './audios/impact1.ogg', buffer => impact1.setBuffer( buffer ) );
		audioLoader.load( './audios/impact2.ogg', buffer => impact2.setBuffer( buffer ) );
		audioLoader.load( './audios/impact3.ogg', buffer => impact3.setBuffer( buffer ) );
		audioLoader.load( './audios/impact4.ogg', buffer => impact4.setBuffer( buffer ) );
		audioLoader.load( './audios/impact5.ogg', buffer => impact5.setBuffer( buffer ) );
		audioLoader.load( './audios/impact6.ogg', buffer => impact6.setBuffer( buffer ) );
		audioLoader.load( './audios/impact7.ogg', buffer => impact7.setBuffer( buffer ) );
		audioLoader.load( './audios/health.ogg', buffer => health.setBuffer( buffer ) );
		audioLoader.load( './audios/ammo.ogg', buffer => ammo.setBuffer( buffer ) );
		audios.set( 'blaster_shot', blasterShot );
		audios.set( 'shotgun_shot', shotgunShot );
		audios.set( 'assault_rifle_shot', assaultRifleShot );
		audios.set( 'reload', reload );
		audios.set( 'shotgun_shot_reload', shotgunShotReload );
		audios.set( 'step1', step1 );
		audios.set( 'step2', step2 );
		audios.set( 'impact1', impact1 );
		audios.set( 'impact2', impact2 );
		audios.set( 'impact3', impact3 );
		audios.set( 'impact4', impact4 );
		audios.set( 'impact5', impact5 );
		audios.set( 'impact6', impact6 );
		audios.set( 'impact7', impact7 );
		audios.set( 'health', health );
		audios.set( 'ammo', ammo );
		return this;
	}
_loadAudios ( ) { const audioLoader = this . audioLoader ; const audios = this . audios ; const listener = this . listener ; const blasterShot = new PositionalAudio ( listener ) ; blasterShot . matrixAutoUpdate = false ; const shotgunShot = new PositionalAudio ( listener ) ; shotgunShot . matrixAutoUpdate = false ; const assaultRifleShot = new PositionalAudio ( listener ) ; assaultRifleShot . matrixAutoUpdate = false ; const reload = new PositionalAudio ( listener ) ; reload . matrixAutoUpdate = false ; const shotgunShotReload = new PositionalAudio ( listener ) ; shotgunShotReload . matrixAutoUpdate = false ; const step1 = new PositionalAudio ( listener ) ; step1 . matrixAutoUpdate = false ; const step2 = new PositionalAudio ( listener ) ; step2 . matrixAutoUpdate = false ; const impact1 = new PositionalAudio ( listener ) ; impact1 . setVolume ( CONFIG . AUDIO . VOLUME_IMPACT ) ; impact1 . matrixAutoUpdate = false ; const impact2 = new PositionalAudio ( listener ) ; impact2 . setVolume ( CONFIG . AUDIO . VOLUME_IMPACT ) ; impact2 . matrixAutoUpdate = false ; const impact3 = new PositionalAudio ( listener ) ; impact3 . setVolume ( CONFIG . AUDIO . VOLUME_IMPACT ) ; impact3 . matrixAutoUpdate = false ; const impact4 = new PositionalAudio ( listener ) ; impact4 . setVolume ( CONFIG . AUDIO . VOLUME_IMPACT ) ; impact4 . matrixAutoUpdate = false ; const impact5 = new PositionalAudio ( listener ) ; impact5 . setVolume ( CONFIG . AUDIO . VOLUME_IMPACT ) ; impact5 . matrixAutoUpdate = false ; const impact6 = new PositionalAudio ( listener ) ; impact6 . setVolume ( CONFIG . AUDIO . VOLUME_IMPACT ) ; impact6 . matrixAutoUpdate = false ; const impact7 = new PositionalAudio ( listener ) ; impact7 . setVolume ( CONFIG . AUDIO . VOLUME_IMPACT ) ; impact7 . matrixAutoUpdate = false ; const health = new PositionalAudio ( listener ) ; health . matrixAutoUpdate = false ; const ammo = new PositionalAudio ( listener ) ; ammo . matrixAutoUpdate = false ; audioLoader . load ( './audios/blaster_shot.ogg' , buffer => blasterShot . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/shotgun_shot.ogg' , buffer => shotgunShot . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/assault_rifle_shot.ogg' , buffer => assaultRifleShot . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/reload.ogg' , buffer => reload . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/shotgun_shot_reload.ogg' , buffer => shotgunShotReload . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/step1.ogg' , buffer => step1 . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/step2.ogg' , buffer => step2 . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/impact1.ogg' , buffer => impact1 . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/impact2.ogg' , buffer => impact2 . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/impact3.ogg' , buffer => impact3 . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/impact4.ogg' , buffer => impact4 . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/impact5.ogg' , buffer => impact5 . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/impact6.ogg' , buffer => impact6 . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/impact7.ogg' , buffer => impact7 . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/health.ogg' , buffer => health . setBuffer ( buffer ) ) ; audioLoader . load ( './audios/ammo.ogg' , buffer => ammo . setBuffer ( buffer ) ) ; audios . set ( 'blaster_shot' , blasterShot ) ; audios . set ( 'shotgun_shot' , shotgunShot ) ; audios . set ( 'assault_rifle_shot' , assaultRifleShot ) ; audios . set ( 'reload' , reload ) ; audios . set ( 'shotgun_shot_reload' , shotgunShotReload ) ; audios . set ( 'step1' , step1 ) ; audios . set ( 'step2' , step2 ) ; audios . set ( 'impact1' , impact1 ) ; audios . set ( 'impact2' , impact2 ) ; audios . set ( 'impact3' , impact3 ) ; audios . set ( 'impact4' , impact4 ) ; audios . set ( 'impact5' , impact5 ) ; audios . set ( 'impact6' , impact6 ) ; audios . set ( 'impact7' , impact7 ) ; audios . set ( 'health' , health ) ; audios . set ( 'ammo' , ammo ) ; return this ; }
Loads all audios from the backend.
Loads all audios from the backend .