當前位置: 首頁>>代碼示例>>C#>>正文


C# Animation.IsPlaying方法代碼示例

本文整理匯總了C#中UnityEngine.Animation.IsPlaying方法的典型用法代碼示例。如果您正苦於以下問題:C# Animation.IsPlaying方法的具體用法?C# Animation.IsPlaying怎麽用?C# Animation.IsPlaying使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UnityEngine.Animation的用法示例。


在下文中一共展示了Animation.IsPlaying方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ICheckAnimationComplete

    public static IEnumerator ICheckAnimationComplete(Animation targetAnimation, string targetAnimatedName, GameObject callbackObj, string callbackFunction)
    {
        do
        {
            yield return null;
        } while (targetAnimation.IsPlaying(targetAnimatedName));

        Debug.Log(targetAnimatedName + " finish !");

        // here ! call back to delegation obj.
        if (callbackObj != null)
            callbackObj.SendMessage (callbackFunction, SendMessageOptions.DontRequireReceiver);
        else
            OnTargetAnimationComplete_event (EventArgs.Empty);
    }
開發者ID:mzget,項目名稱:TK_SushiShop,代碼行數:15,代碼來源:CheckingUnityAnimationComplete.cs

示例2: QueueIdle

 private IEnumerator QueueIdle(Animation source)
 {
     while (source.IsPlaying(_ClipName))
         yield return new WaitForFixedUpdate();
     source.CrossFade(AnimationResources.Idle);
 }
開發者ID:DR9885,項目名稱:Possessed,代碼行數:6,代碼來源:DialogueAnimationEvent.cs

示例3: primaryAnimator

 protected void primaryAnimator(float speed, float time, WrapMode wrap, string name, Animation a)
 {
     if (a != null)
     {
         a[name].speed = speed;
         if (!a.IsPlaying(name))
         {
             a[name].wrapMode = wrap;
             a[name].normalizedTime = time;
             a.Blend(name, 1f);
         }
     }
 }
開發者ID:romarro,項目名稱:Orbital-Science,代碼行數:13,代碼來源:DMModuleScienceAnimate.cs

示例4: playAnimation

 private void playAnimation(Animation animation, AnimationClip clip)
 {
     if(!animation.IsPlaying(clip.name)) {
         animation.Play(clip.name);
     }
 }
開發者ID:rbtk,項目名稱:photon-test,代碼行數:6,代碼來源:PlayerAnimation.cs

示例5: blendAnimation

 private void blendAnimation(Animation animation, AnimationClip clip)
 {
     if(!animation.IsPlaying(clip.name)) {
         animation.Blend(clip.name, 4f);
     }
 }
開發者ID:rbtk,項目名稱:photon-test,代碼行數:6,代碼來源:PlayerAnimation.cs

示例6: lightAnimator

 private void lightAnimator(Animation a, string name, bool stop)
 {
     if (!a.IsPlaying(name) && !stop)
     {
         a[name].speed = 1f;
         a[name].normalizedTime = 0f;
         a[name].wrapMode = WrapMode.Loop;
         a.Blend(name);
     }
     else if (stop)
     {
         a[name].normalizedTime = a[name].normalizedTime % 1;
         a[name].wrapMode = WrapMode.Clamp;
     }
 }
開發者ID:kenjinsama,項目名稱:Orbital-Science,代碼行數:15,代碼來源:DMAsteroidScanner.cs

示例7: animator

 //Controls the main, door-opening animation
 private void animator(float speed, float time, Animation a, string name)
 {
     if (a != null)
     {
         a[name].speed = speed;
         if (!a.IsPlaying(name))
         {
             a[name].normalizedTime = time;
             a.Blend(name, 1f);
         }
     }
 }
開發者ID:kenjinsama,項目名稱:Orbital-Science,代碼行數:13,代碼來源:DMAsteroidScanner.cs

示例8: AnimationStillPlaying

 /// <summary>
 /// 判斷動作是否播放完畢
 /// </summary>
 /// <param name="animationName"></param>
 /// <returns></returns>
 private bool AnimationStillPlaying(Animation animation, string animationName)
 {
     return animation.IsPlaying(animationName) && animation[animationName].normalizedTime < 1.0f;
 }
開發者ID:motouhui,項目名稱:3in1,代碼行數:9,代碼來源:CharaMotion.cs


注:本文中的UnityEngine.Animation.IsPlaying方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。