private void ExplodePortal() { RaceStageUIController.portalsKilled++; rend = GetComponent <Renderer>(); rend.enabled = true; DeathScream.playDeathScreamPortal(); Debug.Log("ExplodePortal()"); GetComponent <MeshExploder>().Explode(); Destroy(gameObject); }
void OnParticalCollision(GameObject other) { if (other.tag == "Player") { rend = GetComponent <Renderer>(); rend.enabled = true; DeathScream.playDeathScreamPortal(); GetComponent <MeshExploder>().Explode(); Destroy(gameObject); } }
void OnTriggerEnter(Collider other) { print(gameObject.GetType()); if (other.gameObject.tag == "Player") { rend = GetComponent <Renderer>(); rend.enabled = true; DeathScream.playDeathScreamPortal(); GetComponent <MeshExploder>().Explode(); Destroy(gameObject); } }