void OnTriggerEnter2D(Collider2D collision) { if (collision.transform.tag == "Projectal" && this.gameObject.transform.tag == "Player" || collision.transform.tag == "WormPart" && this.gameObject.transform.tag == "Player") { gameOverScreen.SetActive(true); gameOver = false; } else if (collision.transform.tag == "PointCircle" && this.gameObject.transform.tag == "Player") { PointSystem pointSystem = this.gameObject.GetComponent <PointSystem>(); Destroy(collision); pointSystem.UpdateState(); } }