给游戏物体添加销毁脚本以及invoke和invokeRepeating

this.gameObject.AddComponent("脚本名"); Destroy(this.gameObject.GetComponent<脚本名>()); invoke("脚本名",时间);过多长时间调用该脚本this invokeRepeating("脚本名",时间1,时间2);在时间1后,每隔时间2调用该脚本。code
相关文章
相关标签/搜索