public void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag.Equals("DeadlyBox")) { Die(); } if (collision.gameObject.tag.Equals("Finish")) { CoinScript.CoinSet(); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); AudioManager.PlaySound("complete"); } if (collision.gameObject.tag.Equals("Win")) { CoinScript.Win(); } }