当前位置: 首页>>代码示例>>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;未经允许,请勿转载。