📜  如果动画师完成动画,则销毁游戏对象 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:55.035000             🧑  作者: Mango

代码示例1
// destroy the game object if the animator has finished its animation
        if (anim.GetCurrentAnimatorStateInfo(0).normalizedTime >= 1)
        {
            Destroy(gameObject);
        }