本文整理汇总了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);
//
//
//
// }
//
}
示例2: DelayAnimation
IEnumerator DelayAnimation(Animation Anim, string Name)
{
m_animCount++;
yield return new WaitForSeconds(m_animCount * m_delay);
Anim.PlayQueued(Name, QueueMode.CompleteOthers);
}
示例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;
}
示例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];
}