public PlayingSound(string tag, Sound sound, bool loop, float volume)
        {
            // Assign the sound given.
            this.Sound = sound;

            // Configure it with the specifications given.
            this.Sound.Loop   = loop;
            this.Sound.Volume = volume;
            this.Tag          = tag;

            // Flag the sound as NoError to prevent disposing.
            this.Flag = AudioFlag.NoError;

            // Finally, play the sound.
            this.Sound.Play();
        }
Esempio n. 2
0
        public PlayingMusic(string tag, Music music, bool loop, float volume)
        {
            // Assign the music given.
            this.Music = music;

            // Configure it with the specifications given.
            this.Music.Loop   = loop;
            this.Music.Volume = volume;
            this.Tag          = tag;

            // Flag the music as NoError to prevent disposing.
            this.Flag = AudioFlag.NoError;

            // Finally, play it.
            this.Music.Play();
        }
Esempio n. 3
0
 public static void SetAudioFlag(AudioFlag flag, bool toggle)
 {
     Function.Call(Hash.SET_AUDIO_FLAG, flag.ToString(), toggle);
 }
Esempio n. 4
0
 public static void SetAudioFlag(AudioFlag flag, bool toggle)
 {
     SetAudioFlag(_audioFlags[(int)flag], toggle);
 }
 public void FlagDisposable()
 {
     this.Flag = AudioFlag.Disposable;
 }