当前位置: 首页>>代码示例>>C#>>正文


C# Animation.CrossFadeQueued方法代码示例

本文整理汇总了C#中UnityEngine.Animation.CrossFadeQueued方法的典型用法代码示例。如果您正苦于以下问题:C# Animation.CrossFadeQueued方法的具体用法?C# Animation.CrossFadeQueued怎么用?C# Animation.CrossFadeQueued使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnityEngine.Animation的用法示例。


在下文中一共展示了Animation.CrossFadeQueued方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PlayAnimation

 private bool PlayAnimation(Animation animation, string name)
 {
     bool b = false;
     if(animation != null && name != "" && animation[name] != null)
     {
         if(this.show) animation[name].layer = this.min;
         if(this.playOptions[this.number] == "Play")
         {
             animation.Play(name, this.playMode);
         }
         else if(this.playOptions[this.number] == "CrossFade")
         {
             animation.CrossFade(name, this.time, this.playMode);
         }
         else if(this.playOptions[this.number] == "Blend")
         {
             animation.Blend(name, this.speed, this.time);
         }
         else if(this.playOptions[this.number] == "PlayQueued")
         {
             animation.PlayQueued(name, this.queueMode, this.playMode);
         }
         else if(this.playOptions[this.number] == "CrossFadeQueued")
         {
             animation.CrossFadeQueued(name, this.time, this.queueMode, this.playMode);
         }
         b = true;
     }
     return b;
 }
开发者ID:hughrogers,项目名称:RPGQuest,代码行数:30,代码来源:AnimationASteps.cs

示例2: metcrossfadetransitionanimation

 public static int metcrossfadetransitionanimation(Transform varpcharacter, string varpdestinationanimname, float varptransitiontime, Transform varpcontroller = null, string varpstateanimationname = "", bool varpgokinematic = true, string varpnewanimname = "transition", Animation varpanimationsystem = null, SkinnedMeshRenderer varprenderer = null, clsurganimationstatesmanager varpstatesmanager = null)
 {
     if (varpcharacter == null)
     {
         return -1;
     }
     if (varptransitiontime == 0f)
     {
         return -2;
     }
     if (varpanimationsystem == null)
     {
         varpanimationsystem = varpcharacter.root.GetComponentInChildren<Animation>();
         if (varpanimationsystem == null)
         {
             return -3;
         }
         varpanimationsystem.Stop();
     }
     if (varprenderer == null)
     {
         varprenderer = varpcharacter.root.GetComponentInChildren<SkinnedMeshRenderer>();
         if (varprenderer == null)
         {
             return -4;
         }
     }
     if (varpgokinematic)
     {
         clsurgutils.metgodriven(varpcharacter, true);
     }
     Vector3 localPosition = default(Vector3);
     if (varpcontroller != null)
     {
         Vector3 position = varpcharacter.position;
         varpcontroller.position = position;
         varpcharacter.localPosition = localPosition;
     }
     AnimationClip animationClip = clsurgutils.metcreatetransitionanimation(varpcharacter, varpdestinationanimname, varptransitiontime, varpnewanimname, ref localPosition, varpstatesmanager, false);
     if (animationClip != null)
     {
         varpanimationsystem.Stop();
         AnimationState animationState = varpanimationsystem[varpdestinationanimname];
         if (animationState != null && animationState.name != varpdestinationanimname)
         {
             varpanimationsystem.RemoveClip(varpnewanimname);
         }
         varpanimationsystem.AddClip(animationClip, varpnewanimname);
         if (varpstateanimationname != string.Empty)
         {
             varpanimationsystem[varpnewanimname].wrapMode = WrapMode.Once;
             varpanimationsystem.CrossFade(varpnewanimname);
             varpanimationsystem.CrossFadeQueued(varpstateanimationname);
         }
         else
         {
             varpanimationsystem.CrossFade(varpnewanimname);
         }
         return 1;
     }
     Debug.LogError("Could not create transition");
     return -5;
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:63,代码来源:clsurgutils.cs


注:本文中的UnityEngine.Animation.CrossFadeQueued方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。