Beispiel #1
0
 public void PlayCartoonAni()
 {
     if (currentActiveSenceInteractiveInfo != null)
     {
         CartoonPlayArgs cartoonArgs = currentActiveSenceInteractiveInfo.GetComponent <CartoonPlayArgs>();
         if (!DefaultGUI.isPortraitUI && cartoonArgs != null && cartoonArgs.hxAudioClip != null)
         {
             //如果已经播放,默认是不播放的
             if (!cartoonArgs.hasPlayed)
             {
                 cartoonPlayer.OpenCartoonPeopleUseAudioFile(cartoonArgs.hxAudioClip, cartoonArgs.cartoonType);
                 cartoonPlayer.Pause();
                 cartoonArgs.hasPlayed = true;
             }
             else
             {
                 cartoonPlayer.OpenCartoonPeopleUseAudioFile(cartoonArgs.hxAudioClip, cartoonArgs.cartoonType);
                 cartoonPlayer.Pause();
             }
         }
         else
         {
             cartoonPlayer.CloseCaratoonPeople();
         }
     }
 }
 public void StopTTSSequence()
 {
     if (sequenceCoroutine != null)
     {
         StopCoroutine(sequenceCoroutine);
     }
     cartoonPlayer.CloseCaratoonPeople();
 }