public QuestionStatisticsInfoPrototype(int storyNumber, StorySpec storySpec, int episodeNumber, EpisodeSpec episodeSpec) { StoryNumber = storyNumber; StorySpec = storySpec; EpisodeNumber = episodeNumber; EpisodeSpec = episodeSpec; }
private IEnumerator PlayStoryRoutine() { yield return(new WaitForSeconds(_currentStory.GeneralStoriesSpec.DelayBeforeStory)); Debug.Log($"Playing story [{_currentStory.StoryName}]"); for (var i = 0; i < _currentStory.EpisodesCount; i++) { _currentEpisode = _currentStory.GetEpisodeSpec(i); Debug.Log($"Starting episode [{i.ToString()}] - [{_currentEpisode.EpisodeName}]"); _backgroundSwitcher.Setup(_currentStory.TranslationBetweenEpisodes, _currentEpisode.Background, _currentEpisode.BlurredBackground); _episodePlayer.Setup(_currentEpisode, audioSource); _highlightController.Setup(_currentEpisode.Highlights.Values); _questionsAsker.Setup(audioSource, GetStatisticsInfoPrototype()); yield return(StartCoroutine(_backgroundSwitcher.SwitchBackgrounds())); onStartPlayingEpisode?.Invoke(); _highlightController.EnableHighlights(); yield return(StartCoroutine(_episodePlayer.Play())); yield return(StartCoroutine(_questionsAsker.AskQuestions(_currentEpisode.EpisodeQuestions))); } Debug.Log("There are no episodes left, story has ended."); }
public void Setup(EpisodeSpec episodeSpec, AudioSource audioSource) { _episodeSpec = episodeSpec; _audioSource = audioSource; }