Recent Posts

JavaScript - Destroy object after

JavaScript

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
Google Compartilhe

Hoje

    Blogger Comente
    Facebook Comente

0 comentários:

Postar um comentário