static private FlxSound loadSound(SoundEffect EmbeddedSound, float Volume, bool Looped, bool AutoDestroy, bool AutoPlay) { if (EmbeddedSound == null) { FlxG.log("WARNING: FlxG.loadSound() requires an embedded sound to work."); return(null); } FlxSound sound = new FlxSound(); if (EmbeddedSound != null) { sound.loadEmbedded(EmbeddedSound, Looped, AutoDestroy); } sound.volume = Volume; if (AutoPlay) { sound.play(); } return(sound); }
private static FlxSound loadSound(SoundEffect EmbeddedSound, float Volume, bool Looped, bool AutoDestroy, bool AutoPlay) { if (EmbeddedSound == null) { FlxG.log("WARNING: FlxG.loadSound() requires an embedded sound to work."); return null; } FlxSound sound = new FlxSound(); if (EmbeddedSound != null) sound.loadEmbedded(EmbeddedSound, Looped, AutoDestroy); sound.volume = Volume; if (AutoPlay) sound.play(); return sound; }