Animation.IsPlaying 是否在播放?
function IsPlaying (name : string) : bool
Description描述
Is the animation named name playing?
名为name的动画正在播放吗?
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnMouseEnter() {
if (!animation.IsPlaying("mouseOverEffect"))
animation.Play("mouseOverEffect");
}
}
// Plays an animation only if we are not playing it already.
//仅当不播放时,播放动画
function OnMouseEnter() {
if (!animation.IsPlaying("mouseOverEffect"))
animation.Play("mouseOverEffect");
}
最后修改:2011年1月13日 Thursday 0:16