void OnTriggerEnter(Collider col) { if(col.gameObject.tag == "Converser") { // Trigger if the collider is not orbiting. OrbReaction reaction = col.gameObject.GetComponent<OrbReaction>(); if (reaction != null && reaction.StartTrip()) { feedback = col.gameObject.GetComponent<Feedback>(); feedback.AlternateTrail(); largeExplosion = (GameObject)Instantiate(largeExplosionPrefab); largeExplosion.transform.position = col.transform.position; Destroy(gameObject); } } }
void OnTriggerEnter(Collider col) { if (col.gameObject.tag == "Converser") { // Trigger if the collider is not orbiting. OrbReaction reaction = col.gameObject.GetComponent <OrbReaction>(); if (reaction != null && reaction.StartTrip()) { feedback = col.gameObject.GetComponent <Feedback>(); feedback.AlternateTrail(); largeExplosion = (GameObject)Instantiate(largeExplosionPrefab); largeExplosion.transform.position = col.transform.position; Destroy(gameObject); } } }