本文整理汇总了C#中Animator.StopPlayback方法的典型用法代码示例。如果您正苦于以下问题:C# Animator.StopPlayback方法的具体用法?C# Animator.StopPlayback怎么用?C# Animator.StopPlayback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Animator
的用法示例。
在下文中一共展示了Animator.StopPlayback方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PlayAnimation
public IEnumerator PlayAnimation(string AnimationName)
{
Debug.Log ("PlayAnimation(): " + AnimationName);
Anim = gameObject.GetComponent<Animator>();
Anim.Play(AnimationName,0,0);
yield return new WaitForSeconds(1.65f) ;
Anim.StopPlayback();
}
示例2: PlayPowerAnimationAndInstantiate
// public GameObject getRagDollGameObject()
// {
// return rgb;
// }
public IEnumerator PlayPowerAnimationAndInstantiate(string AnimationName, float Power, float Velocity)
{
Debug.Log ("PlayPowerAnimationAndInstantiate(): " + AnimationName);
Anim = gameObject.GetComponent<Animator>();
Anim.Play(AnimationName,0,0);
yield return new WaitForSeconds(1.65f) ;
Anim.StopPlayback();
GameObject PrisonerToFire = CopSetup.GetNextPrisoner();
PrisonerToFireFinal = (GameObject)Instantiate(PrisonerToFire, spawnPoint.transform.position, Quaternion.identity);
//rgb=(GameObject)Instantiate(ragDoll,spawnPoint.transform.position,Quaternion.identity);
Transform Direction = spawnPoint.transform;
Component [] rgbs = PrisonerToFireFinal.GetComponentsInChildren(typeof(Rigidbody));
foreach(Rigidbody rigidBDY in rgbs)
{
rigidBDY.AddForce(Direction.forward * Power);
rigidBDY.AddForce(Direction.up * (Velocity));
}
cameraMovement.prisonerT = PrisonerToFireFinal.transform.GetChild(1).gameObject;
cameraMovement.spawned = true;
}
示例3: Awake
// Use this for initialization
void Awake () {
anim = GetComponent<Animator>();
anim.StopPlayback ();
}
示例4: Start
// Use this for initialization
void Start()
{
anim = GetComponent<Animator>();
anim.StopPlayback();
}
示例5: Start
// Use this for initialization
void Start()
{
pushback = 0.3f;
worth = 160;
moveSpeed = 1.5f;
moveSpeedOriginal = moveSpeed;
currentHealth = 200;
maxHealth = 200;
isStunned = false;
isMoving = false;
immunityFrames = false;
stunDuration = 0;
player = GameObject.FindGameObjectWithTag("Player");
//pc = player.GetComponent(typeof(PlayerController)) as PlayerController;
GameObject sw = this.gameObject.transform.GetChild(0).transform.GetChild(0).transform.GetChild(0).gameObject;
hitcollider = sw.GetComponent(typeof(BoxCollider2D)) as BoxCollider2D;
GameObject parent = this.gameObject.transform.GetChild(0).gameObject;
anm = parent.GetComponent(typeof(Animator)) as Animator;
hitcollider.enabled = false;
anm.StopPlayback();
}
示例6: Start
void Start()
{
Application.runInBackground = true;
anim = GetComponent<Animator>();
anim.StopPlayback();
}
示例7: Start
// Use this for initialization
void Start()
{
pushback = 0.2f;
worth = 5000;
moveSpeed = 2f;
moveSpeedOriginal = moveSpeed;
currentHealth = 1800;
maxHealth = 2000;
isStunned = false;
isMoving = false;
immunityFrames = false;
stunDuration = 0;
candrown = false;
player = GameObject.FindGameObjectWithTag("Player");
//pc = player.GetComponent(typeof(PlayerController)) as PlayerController;
groundslam = transform.GetChild(0).transform.GetChild(0).transform.GetChild(7).gameObject;
anm = transform.GetChild(0).transform.GetChild(0).gameObject.GetComponent<Animator>();
laserL = transform.GetChild(0).transform.GetChild(0).transform.GetChild(3).transform.GetChild(0).transform.GetChild(1).gameObject;
tentacleL = transform.GetChild(0).transform.GetChild(0).transform.GetChild(3).transform.GetChild(0).transform.GetChild(0).gameObject;
jointL = transform.GetChild(0).transform.GetChild(0).transform.GetChild(3).transform.GetChild(1).gameObject;
laserM = transform.GetChild(0).transform.GetChild(0).transform.GetChild(4).transform.GetChild(0).transform.GetChild(1).gameObject;
tentacleM = transform.GetChild(0).transform.GetChild(0).transform.GetChild(4).transform.GetChild(0).transform.GetChild(0).gameObject;
jointM = transform.GetChild(0).transform.GetChild(0).transform.GetChild(4).transform.GetChild(1).gameObject;
laserR = transform.GetChild(0).transform.GetChild(0).transform.GetChild(5).transform.GetChild(0).transform.GetChild(1).gameObject;
tentacleR = transform.GetChild(0).transform.GetChild(0).transform.GetChild(5).transform.GetChild(0).transform.GetChild(0).gameObject;
jointR = transform.GetChild(0).transform.GetChild(0).transform.GetChild(5).transform.GetChild(1).gameObject;
groundslam.SetActive(false);
laserL.SetActive(false);
laserR.SetActive(false);
laserM.SetActive(false);
jointL.SetActive(false);
jointM.SetActive(false);
jointR.SetActive(false);
tentacleL.SetActive(false);
tentacleR.SetActive(false);
tentacleM.SetActive(false);
anm.StopPlayback();
}