当我的敌人死亡时,我用它来播放死亡动画:
transform.GetChild(0).GetComponent<Animator>().Play("Death_01");
我想让代码在“Death_01”或“Death_02”之间进行选择。
做到这一点最简单的方法是什么?(数组、随机数、OR、..)
c# random unity-game-engine
c# ×1
random ×1
unity-game-engine ×1