//播放开火动画并初始化shootTimer
gameObject.GetComponent<Animation>().Play();
shootTimer = 0;
void Start()
{
StartCoroutine("DestroyMyself");
}
IEnumerator DestroyMyself()
{
//等待3秒之后销毁自身
yield return new WaitForSeconds(3);
Destroy(this.gameObject);
}