Animation.Stop 停止


function Stop () : void

Description描述

Stops all playing animations that were started with this Animation.

停止所有当前Animation正在播放的动画。

Stopping an animation also Rewinds it to the Start.  

停止一个动画会让动画重回开始位置。

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {animation.Stop();}}
// Stop all animations//停止所有动画。animation.Stop();

• function Stop (name : string) : void

Description描述

Stops an animation named name.

停止播放名称为name的动画。

Stopping an animation also Rewinds it to the Start.  

停止一个动画会让动画重回开始位置。

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {animation.Stop("walk");}}
// Stop the walk animation//停止walk动画。animation.Stop("walk");


,