Inheritance: FlxBasic
Example #1
0
        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);
        }
Example #2
0
 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;
 }