void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Coin") { cn.CoinCollected(); Destroy(other.gameObject); } if (other.tag == "WinTrigger") { SceneManager.LoadScene("WinMenu"); } if (other.tag == "Enemy") { SceneManager.LoadScene("LoseMenu"); } }