void OnTriggerEnter(Collider other) { if (other.tag == "Player") { ScriptDestruir des = other.gameObject.GetComponent <ScriptDestruir>(); des.Destruir("Player"); } }
void OnTriggerEnter(Collider other) { if (other.tag == "Enemigo") { if (colisionando) { return; } colisionando = true; ScriptDestruir des = other.gameObject.GetComponent <ScriptDestruir>(); des.Destruir("Enemigo"); scriptPuntuacion.SumarTanque(); //Application.LoadLevel("EscenaFinPierdes"); } }
void OnTriggerEnter(Collider other) { if (other.tag == "Player") { if (colisionando) { return; } colisionando = true; ScriptDestruir des = other.gameObject.GetComponent <ScriptDestruir>(); //this.GetComponentInParent<NavigatorMovement>().ParaDePerseguir(); des.Destruir("Player"); //Application.LoadLevel("EscenaFinPierdes"); } }