问题`//弃用代码 animation.Play()` 解决办法 transform.GetComponent<Animation>().Play("takedamage"); //先获取本身组件后面就可以继续调用了