Example #1
0
 public void PlayActiveSound()
 {
     if (this.activeSound.SoundProfileType == SoundProfileType.SoundEffect)
     {
         this.IsPlay = false;
         SoundLib.PlaySoundEffect(this.activeSound.SoundIndex, this.soundView.SoundVolume, this.soundView.PanningPosition, this.soundView.PitchPosition);
     }
     else if (this.activeSound.SoundProfileType == SoundProfileType.Song)
     {
         this.IsPlay = false;
         SoundLib.PlaySong(this.activeSound.SoundIndex, this.soundView.SoundVolume, this.soundView.PanningPosition, this.soundView.PitchPosition);
     }
     else if (this.activeSound.SoundProfileType == SoundProfileType.Music)
     {
         this.IsPlay = true;
         SoundLib.PlayMusic(this.activeSound.SoundIndex);
     }
     else if (this.activeSound.SoundProfileType == SoundProfileType.Sfx)
     {
         this.IsPlay = false;
         SoundLib.PlaySfxSound(this.activeSound.SoundIndex, this.soundView.SoundVolume, this.soundView.PanningPosition, this.soundView.PitchPosition);
     }
     else if (this.activeSound.SoundProfileType == SoundProfileType.MovieAudio)
     {
         this.IsPlay = true;
         String[] array = this.activeSound.Name.Split(new Char[]
         {
             '/'
         });
         SoundLib.PlayMovieMusic(array[(Int32)array.Length - 1], 0);
     }
     else
     {
         this.IsPlay = false;
     }
 }