public static void LoadAudioPlayers() { AudioPlayers.Add(MusicAudioPlayer); AudioPlayers.Add(QuestionAudioPlayer); AudioPlayers.Add(AnswerAudioPlayer); AudioPlayers.Add(EndAudioPlayer); //Load Music if (String.IsNullOrEmpty(Presentation.Audio.Music.Name) == false) { string audio = Path.Combine(GetAudioFolderPath(), Presentation.Audio.Music.Name); MusicAudioPlayer.Load(audio); } //Load Question SFX if (String.IsNullOrEmpty(Presentation.Audio.Question.Name)) { string audio = Path.Combine(GetDefaultAudioFolderPath(), DEFAULT_QUESTION_SOUND); QuestionAudioPlayer.Load(audio); } else { QuestionAudioPlayer.Load(Path.Combine(GetAudioFolderPath(), Presentation.Audio.Question.Name)); } //Load Answer SFX if (String.IsNullOrEmpty(Presentation.Audio.Answer.Name)) { string audio = Path.Combine(GetDefaultAudioFolderPath(), DEFAULT_ANSWER_SOUND); AnswerAudioPlayer.Load(audio); } else { AnswerAudioPlayer.Load(Path.Combine(GetAudioFolderPath(), Presentation.Audio.Answer.Name)); } //Load End SFX if (String.IsNullOrEmpty(Presentation.Audio.End.Name)) { string audio = Path.Combine(GetDefaultAudioFolderPath(), DEFAULT_END_SOUND); EndAudioPlayer.Load(audio); } else { EndAudioPlayer.Load(Path.Combine(GetAudioFolderPath(), Presentation.Audio.End.Name)); } }
/// <summary> /// AudioPlayerの登録。 /// </summary> /// <param name="player"></param> public void RegistPlayer(AudioPlayer player) { AudioPlayers.Add(player); }