美文网首页
Unity 开始和暂停动画

Unity 开始和暂停动画

作者: 114105lijia | 来源:发表于2022-03-25 11:47 被阅读0次
    public class Animation : MonoBehaviour
    {
        private Animator ani;
    
        // Start is called before the first frame update
        void Start()
        {
            ani = GetComponent<Animator>();
    
            ani.speed = 0;  //暂停
    
            ani.speed = 1;  //开始
        }
    
        // Update is called once per frame
        void Update()
        {
            
        }
    }
    
    
    
    
    

    相关文章

      网友评论

          本文标题:Unity 开始和暂停动画

          本文链接:https://www.haomeiwen.com/subject/zqorjrtx.html