Version: 2017.1
public bool isPlaying ;

描述

我们正在播放动画吗?

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Animation anim; void Start() { anim = GetComponent<Animation>(); } void OnMouseEnter() { if (!anim.isPlaying) anim.Play(); } }