// Update is called once per frame
    void Update()
    {
        instance.timer -= Time.deltaTime;
        //timerSeconds.text = timer.ToString ("f1");

        if (instance.timer <= 0)
        {
            if (cube != null && GUI != null && GUIM != null)
            {
                cube.SetActive(true);
                GUI.SetActive(true);
                GUIM.SetActive(true);
            }
            SceneManager.LoadScene(RestartGame, LoadSceneMode.Single);
        }

        else if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (cube != null && GUI != null && GUIM != null)
            {
                cube.SetActive(true);
                GUI.SetActive(true);
                GUIM.SetActive(true);
            }
            SceneManager.LoadScene(RestartGame, LoadSceneMode.Single);
        }

        else if (instance.timer > 0)
        {
            if (cube != null && GUI != null && GUIM != null)
            {
                cube.SetActive(false);
                GUI.SetActive(false);
                GUIM.SetActive(false);
            }
        }
    }