using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AnimatorStop : MonoBehaviour
{
private Animator animator;//找到动画
public Image shu;//动画完成后出现的提示
// Use this for initialization
void Start()
{
shu.gameObject.SetActive(false);
animator = this.GetComponent<Animator>();//得到动画组件
}
// Update is called once per frame
void Update()
{
AnimatorStateInfo info = animator.GetCurrentAnimatorStateInfo(0);
// 判断动画是否播放完成
if (info .normalizedTime >= 1.0f)
{
shu.gameObject.SetActive(true);
//度数版显示
}
}
}
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AnimatorStop : MonoBehaviour
{
private Animator animator;//找到动画
public Image shu;//动画完成后出现的提示
// Use this for initialization
void Start()
{
shu.gameObject.SetActive(false);
animator = this.GetComponent<Animator>();//得到动画组件
}
// Update is called once per frame
void Update()
{
AnimatorStateInfo info = animator.GetCurrentAnimatorStateInfo(0);
// 判断动画是否播放完成
if (info .normalizedTime >= 1.0f)
{
shu.gameObject.SetActive(true);
//度数版显示
}
}
}