Animation.isPlayingvar isPlaying : booleanDescriptionAre we playing any animations?
JavaScripts
// Plays an animation only if we are not playing it already.
function OnMouseEnter() { if (!animation.isPlaying) animation.Play(); } using UnityEngine;
using System.Collections; public class example : MonoBehaviour { void OnMouseEnter() { if (!animation.isPlaying) animation.Play(); } } import UnityEngine
import System.Collections class example(MonoBehaviour): def OnMouseEnter(): if not animation.isPlaying: animation.Play() |
