Unity3D 的延迟函数

//定义 WaitAndPrint()方法  
  IEnumerator WaitAndPrint(float waitTime)  
    {  
        yield return new WaitForSeconds(waitTime);  
    //等待之后执行的动作  
        CollisionGameObject_1.transform.position = new Vector3(1.7f, 0.4f, -0.15f);  
    }  

你可能感兴趣的:(Unity3D 的延迟函数)