0
** HI其实我想扔射击子弹之类的游戏对象但它不起作用。它无需等待就会抛出无限制的游戏对象。这是我在ARCamera上的脚本。在Vuforia拍摄游戏对象
//Script starts
var prefabBullet : Transform;
var speed : float;
var gameObjects : GameObject[];
function Update() { Invoke("Shoot", 2.0f); }
function Shoot() { yield WaitForSeconds(3);
var instanceBullet=Instantiate(prefabBullet,transform.position,Quaternion.identity);
instanceBullet.rigidbody.AddForce(transform.forward*speed) ;
SomeFunction();
}
function SomeFunction() {
gameObjects = GameObject.FindGameObjectsWithTag ("Player");
for(var i = 0 ; i < gameObjects.length ; i ++)
Destroy(gameObjects[i]);
}
=========================================== =============================
我想抛出一些时间流逝之间gameObjects。**