void explodir() { Instantiate(preFabExplosao, transform.position, transform.rotation); script_GC.morreu(); Destroy(this.gameObject); StartCoroutine("vuneravel"); }
void explodir() { //para instanciar o prefab sem manipular configuracoes, linha abaixo //Instantiate(explosaoPrefab, transform.position, Quaternion.identity); GameObject tempPrefab = Instantiate(explosaoPrefab) as GameObject; tempPrefab.transform.position = transform.position; _GC.morreu(); Destroy(this.gameObject); }