Depois de 5 segundos
#pragma strict
var destroyTime = 5;
function Start () {
}
function Update () {
Destroy(gameObject, destroyTime);
}//FIM
Depois tecla espaço:
#pragma strict
function Start () {
Destroy(gameObject);
}
function Update () {
if(Input.GetKey(KeyCode.Space))
{
Destroy(gameObject);
}
}//FIM
0 comentários:
Postar um comentário