Example #1
0
 public void SetActiveSoundType(SoundProfileType type)
 {
     if (this.activeSound != null)
     {
         SoundLib.StopMusic();
         this.IsPlay = false;
     }
     this.activeType      = type;
     this.currentPlaylist = 0;
     this.GeneratePlaylistData(this.currentPlaylist);
     if (this.playlist != null)
     {
         if (this.playlist.Count > 0)
         {
             this.activeSound = this.playlist[0];
         }
     }
     else
     {
         SoundLib.LogWarning("SetActiveSoundType, playlist is null!");
     }
     if (type == SoundProfileType.Sfx)
     {
     }
 }
Example #2
0
 public void StopActiveSound()
 {
     if (this.activeSound.SoundProfileType == SoundProfileType.Music)
     {
         SoundLib.StopMusic();
         this.IsPlay = false;
     }
     else if (this.activeSound.SoundProfileType == SoundProfileType.SoundEffect)
     {
         SoundLib.StopAllSoundEffects();
     }
     else if (this.activeSound.SoundProfileType == SoundProfileType.Song)
     {
         SoundLib.StopAllSongs();
     }
     else if (this.activeSound.SoundProfileType == SoundProfileType.Sfx)
     {
         SoundLib.StopSfxSound(this.activeSound.SoundIndex);
     }
     else if (this.activeSound.SoundProfileType == SoundProfileType.MovieAudio)
     {
         SoundLib.StopMovieMusic(this.activeSound.Name, true);
     }
 }