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


C# Animator.StopPlayback方法代码示例

本文整理汇总了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();
 }
开发者ID:ryvianstyron,项目名称:PrisonAir,代码行数:8,代码来源:OldScript_AnimatingTest.cs

示例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;
    }
开发者ID:ryvianstyron,项目名称:PrisonAir,代码行数:25,代码来源:OldScript_AnimatingTest.cs

示例3: Awake

	// Use this for initialization
	void Awake () {
		anim = GetComponent<Animator>();	
		anim.StopPlayback ();
		
	}
开发者ID:rtrahms,项目名称:GameDev,代码行数:6,代码来源:DoorControl.cs

示例4: Start

 // Use this for initialization
 void Start()
 {
     anim = GetComponent<Animator>();
     anim.StopPlayback();
 }
开发者ID:robsolomon,项目名称:PartyPoopers,代码行数:6,代码来源:TestBitmapFontSelect.cs

示例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();
 }
开发者ID:charblaze,项目名称:SoulSynthus,代码行数:22,代码来源:VodGiant.cs

示例6: Start

 void Start()
 {
     Application.runInBackground = true;
     anim = GetComponent<Animator>();
     anim.StopPlayback();
 }
开发者ID:valeryjacobs,项目名称:TIMTLTS,代码行数:6,代码来源:Main.cs

示例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();
    }
开发者ID:charblaze,项目名称:SoulSynthus,代码行数:43,代码来源:SEAMONSTER.cs


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