Пример #1
0
    protected IEnumerator DoIntroductionVideo(string playPrompt, string repeatPrompt)
    {
        yield return(PressAnyKey(playPrompt));

        bool replay = false;

        do
        {
            //start video player and wait for it to stop playing
            SetRamulatorState("INSTRUCT", true, new Dictionary <string, object>());
            videoPlayer.StartVideo();
            while (videoPlayer.IsPlaying())
            {
                yield return(null);
            }
            SetRamulatorState("INSTRUCT", false, new Dictionary <string, object>());

            SetRamulatorState("WAITING", true, new Dictionary <string, object>());
            textDisplayer.DisplayText("repeat video prompt", repeatPrompt);
            while (!Input.GetKeyDown(KeyCode.Y) && !Input.GetKeyDown(KeyCode.N))
            {
                yield return(null);
            }
            textDisplayer.ClearText();
            SetRamulatorState("WAITING", false, new Dictionary <string, object>());
            replay = Input.GetKey(KeyCode.N);
        }while (replay);
    }
Пример #2
0
    protected IEnumerator DoIntroductionVideo()
    {
        yield return(PressAnyKey("Press any key to play movie."));

        bool replay = false;

        do
        {
            //start video player and wait for it to stop playing
            SetRamulatorState("INSTRUCT", true, new Dictionary <string, object>());
            videoPlayer.StartVideo();
            while (videoPlayer.IsPlaying())
            {
                yield return(null);
            }
            SetRamulatorState("INSTRUCT", false, new Dictionary <string, object>());

            SetRamulatorState("WAITING", true, new Dictionary <string, object>());
            textDisplayer.DisplayText("repeat video prompt", "Press Y to continue to practice list, \n Press N to replay instructional video.");
            while (!Input.GetKeyDown(KeyCode.Y) && !Input.GetKeyDown(KeyCode.N))
            {
                yield return(null);
            }
            textDisplayer.ClearText();
            SetRamulatorState("WAITING", false, new Dictionary <string, object>());
            replay = Input.GetKey(KeyCode.N);
        }while (replay);
    }
Пример #3
0
 private IEnumerator DoCountdown()
 {
     countdownVideoPlayer.StartVideo();
     while (countdownVideoPlayer.IsPlaying())
     {
         yield return(null);
     }
     //      for (int i = 0; i < currentSettings.countdownLength; i++)
     //      {
     //          textDisplayer.DisplayText ("countdown display", (currentSettings.countdownLength - i).ToString ());
     //          yield return PausableWait (currentSettings.countdownTick);
     //      }
 }