private void OnTriggerEnter(Collider other)
{
if (other.gameObject.name == "Sphere")
{
Invoke("Load", 2);//延迟2秒物体消失
}
}
void Load()
{
this.gameObject.SetActive(false);
}
延时执行事件
最新推荐文章于 2023-01-15 17:34:10 发布