pub fn load_audio(ctx: &mut ggez::Context, script: &mut Script) -> ggez::GameResult {
	let script_audio = &mut script.audio;
	script.commands.iter().try_for_each(|command| match command {
		Command::Music(path) | Command::Sound(path) => Ok({
			if !script_audio.contains_key(path) {
				let audio = ggez::audio::SoundData::new(ctx, path)?;
				script_audio.insert(path.clone(), audio);
			}
		}),
		_ => Ok(()),
	})
}
/// Loads all the audio that is referenced in a script.
Loads all the audio that is referenced in a script.
Loads all the audio that is referenced in a script .
pub fn load_audio(ctx: &mut ggez::Context, script: &mut Script) -> ggez::GameResult {
	let script_audio = &mut script.audio;
	script.commands.iter().try_for_each(|command| match command {
		Command::Music(path) | Command::Sound(path) => Ok({
			if !script_audio.contains_key(path) {
				let audio = ggez::audio::SoundData::new(ctx, path)?;
				script_audio.insert(path.clone(), audio);
			}
		}),
		_ => Ok(()),
	})
}
pub fn load_audio ( ctx : & mut ggez :: Context , script : & mut Script ) -> ggez :: GameResult { let script_audio = & mut script . audio ; script . commands . iter ( ) . try_for_each ( | command | match command { Command :: Music ( path ) | Command :: Sound ( path ) => Ok ( { if ! script_audio . contains_key ( path ) { let audio = ggez :: audio :: SoundData :: new ( ctx , path ) ? ; script_audio . insert ( path . clone ( ) , audio ) ; } } ) , _ => Ok ( ( ) ) , } ) }
Loads all the audio that is referenced in a script.
Loads all the audio that is referenced in a script .
ctx
&mut ggez::Context
script
&mut Script
ctx
&mut ggez::Context
script
&mut Script