// Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.N))
        {
            NextScene();
        }
        if (loading == true)
        {
            trans.FadeInOut(blackscreen, 2);
        }

        if (Input.GetKeyDown(KeyCode.B))
        {
            if (index == 0)
            {
                index = 4;
            }
            else
            {
                index--;
            }
            LoadLast(index);
        }

        if (Input.GetKeyDown(KeyCode.R))
        {
            Reload(index);
        }
    }
 // Update is called once per frame
 void Update()
 {
     counter += Time.deltaTime;
     if (counter >= 4)
     {
         transitions.FadeInOut(blackScreen, 1);
         SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
     }
 }