Unity 开始和暂停动画

2022-03-25  本文已影响0人  114105lijia
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()
    {
        
    }
}




上一篇 下一篇

猜你喜欢

热点阅读