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


C# Animation.PlayQueued方法代碼示例

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


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

示例1: Start

    //public GameObject _player;
    //public float _distance;
    // Use this for initialization
    void Start()
    {
        _animation = GetComponent<Animation> ();
        string _animationToPlay = _animationClip.name.ToString();

        //int animCount = _animation.GetClipCount(); // clip?! Unity people, why not state??
        //Debug.Log("Animations found: " + animCount );

        //_player = GameObject.FindGameObjectWithTag("Player");

        _animation[_animationToPlay].wrapMode = WrapMode.Loop;

        _animation.PlayQueued(_animationToPlay, QueueMode.CompleteOthers);

        //		foreach(AnimationState s in _animation) {
        //
        //			string theName = s.name.ToString();
        //			//_animation[theName].wrapMode = WrapMode.Once;
        //			_animation.PlayQueued(theName, QueueMode.CompleteOthers);
        //
        //
        //
        //		}
        //
    }
開發者ID:BGCX261,項目名稱:zombie-ferox-svn-to-git,代碼行數:28,代碼來源:NPCanimate.cs

示例2: DelayAnimation

 IEnumerator DelayAnimation(Animation Anim, string Name)
 {
     m_animCount++;
     yield return new WaitForSeconds(m_animCount * m_delay);
     Anim.PlayQueued(Name, QueueMode.CompleteOthers);
 }
開發者ID:noctisyounis,項目名稱:Playground2015_Project4,代碼行數:6,代碼來源:BoardBehaviour.cs

示例3: 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

示例4: Start

 // Use this for initialization
 void Start()
 {
     Player = GameObject.FindGameObjectWithTag("Player");
     r = new System.Random();
     anim = transform.Find ("model").animation;
     transform.Find("board_model").gameObject.SetActive(false);
     anim.Play ("Walk Start");
     anim.PlayQueued("Walk Loop");
     AudioSource[] aSources = GetComponents<AudioSource>();
     footsteps = aSources[0];
     talk = aSources[1];
 }
開發者ID:ChrisGermano,項目名稱:LovePlatypus_GGJ2014,代碼行數:13,代碼來源:AIPath.cs


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