IEnumerator SystemWait(float time)
        {
            float elapsed = 0f;

            while (elapsed < time)
            {
                elapsed += Time.deltaTime;
                yield return(null);
            }
            msgPresenter.Interactable = true;
            storyPlayer.Play();
        }
        public static async Task ThrowsTrueException(this IStoryPlayer storyPlayer, IStory story, string messagePattern = null)
        {
            async Task TestCode()
            {
                await storyPlayer.Play(story);
            }

            // ReSharper disable once PossibleNullReferenceException
            var exception = await Record.ExceptionAsync(TestCode);

            Assert.NotNull(exception);
            Assert.IsType <TrueException>(exception);

            if (!string.IsNullOrEmpty(messagePattern))
            {
                Assert.Matches(messagePattern, exception.Message);
            }
        }
Пример #3
0
 public void OnClick()
 {
     if (Interactable)
     {
         if (typingEffectAnimator.IsPlaying)
         {
             typingEffectAnimator.ForceComplete();
         }
         else
         {
             if (systemSound != null)
             {
                 systemSound.PlayClickSound();
             }
             if (audioPlayer != null)
             {
                 audioPlayer.StopSound();
             }
             storyPlayer.Play();
         }
     }
 }