void OnTriggerEnter(Collider other) { if (other.CompareTag("Boundry") || other.CompareTag("Enemy")) { return; } if (explosion != null) { Instantiate(explosion, transform.position, transform.rotation); } if (other.CompareTag("Player")) { Instantiate(playerExplosion, other.transform.position, other.transform.rotation); gameControler.GameOver(); } Destroy(other.gameObject); Destroy(gameObject); if (other.CompareTag("Weapon")) { gameControler.AddScore(scoreValue); } }