public void GotoNextChapter() { //traceText.InputTraceText("Go Chapter1 from 3"); isLoopCount = false; loopCounter = 0; chapterControl.NextChapter(); }
public void VideoPlayControl() { if (isPlay) { isPlay = !isPlay; traceText.InputTraceText("Video fade out and Destroy"); StartCoroutine(FadeOutAndDeactivate()); chapterControl.NextChapter(); } else { isPlay = !isPlay; traceText.InputTraceText("Video fade in and Actiate"); VideoReplay(); // Detect end of video clip vp.loopPointReached += DetectVideoEnd; } }
void Update() { if (isPlay) { if (!audioSourceOne.isPlaying) { crtLoopCount++; traceText.InputTraceText("current BGM loop count: " + crtLoopCount); if (crtLoopCount < maxLoopCount) { traceText.InputTraceText("Chapter2 BGM Play"); ChapterTwoBGMPlay(); } else if (crtLoopCount >= maxLoopCount) { traceText.InputTraceText("Chapter3 Play"); isPlay = false; crtLoopCount = 0; chapterControl.NextChapter(); } } } }