private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.CompareTag("Key"))
        {
            keyObtained = true;
            //Debug.Log("Key Obtained");
            Destroy(other.gameObject);
            onScreenUI.keyDisplayer(keyObtained);
        }
        else if (other.gameObject.CompareTag("Door") && keyObtained == true)
        {
            lifeScript.levelSurvived();
            gameManagerScript.setCurrentLevel("Level2");
            gameManagerScript.startCurrentLevel();
        }
        else if (other.gameObject.CompareTag("loadnext"))
        {
            lifeScript.levelSurvived();
            gameManagerScript.setCurrentLevel("Level3");
            gameManagerScript.startCurrentLevel();
        }
        else if (other.gameObject.CompareTag("river"))
        {
            gameManagerScript.playerDeath();
            if (hit == 0)
            {
                GetComponent <AudioSource>().PlayOneShot(PlayerDeath);
                hit++;
            }
        }
        else if (other.gameObject.CompareTag("Potion") && gameManagerScript.getIsVulnerable() == true)
        {
            gameManagerScript.playerDeath();
            if (hit == 0)
            {
                GetComponent <AudioSource>().PlayOneShot(PotionBreak);
                GetComponent <AudioSource>().PlayOneShot(PlayerDeath, 3);
                hit++;
            }
        }



        //if (other.gameObject.CompareTag("OutOfBounds"))
        //{
        //    //Debug.Log("Out");
        //    SceneManager.LoadScene("SampleScene");
        //}
    }
 public void loadGame()
 {
     gameManagerScript.resetPlayer();
     gameManagerScript.startCurrentLevel();
     //Debug.Log("ButtonClicked");
 }