void OnCollisionEnter2D(Collision2D other) { EnemyController e = other.collider.GetComponent <EnemyController> (); if (e != null) { e.Fix(); } FastEnemyController f = other.collider.GetComponent <FastEnemyController> (); if (f != null) { f.Fix(); } GhostController g = other.collider.GetComponent <GhostController> (); if (g != null) { g.Fix(); } Destroy(gameObject); }