bool IsAnimationPlaying(GameObject objWithAnimation,string animationName) { return objWithAnimation.animation.IsPlaying(animationName)&&objWithAnimation.animation[animationName].normalizedTime<1.0f; }
判断某个动画是否播放完毕。
IEnumerator WaitForAnimationPlayOver(GameObject objWithAnimation,string animationName) { yield return new WaitForSeconds(objWithAnimation.animation[animationName].length); }
等待某个动画播放完成。