Esempio n. 1
0
 //switch to the info screen
 public void gallery_to_info()
 {
     exit_UI();
     info_canvas.SetActive(true);
     gallery_canvas.SetActive(false);
     info_ui.init_UI();
 }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        if (Input.anyKey)
        {
            counter = 0;
            if (idle_warning_canvas.activeSelf)
            {
                idle_warning_canvas.SetActive(false);
            }
        }
        else if (counter < max_time)
        {
            counter++;
        }

        if (counter == warn_time && !info_canvas.activeSelf)
        {
            idle_warning_canvas.SetActive(true);
        }

        if (counter == max_time && !info_canvas.activeSelf)
        {
            idle_warning_canvas.SetActive(false);
            //go back to info screen
            if (gallery_canvas.activeSelf)
            {
                gallery_ui.exit_UI();
                gallery_canvas.SetActive(false);
                info_canvas.SetActive(true);
                info_ui.init_UI();
            }
            else if (drawing_canvas.activeSelf)
            {
                drawing_ui.exit_UI();
                drawing_canvas.SetActive(false);
                info_canvas.SetActive(true);
                info_ui.init_UI();
            }
            else if (color_picker_canvas.activeSelf)
            {
                color_picker_ui.exit_UI();
                color_picker_canvas.SetActive(false);
                info_canvas.SetActive(true);
                info_ui.init_UI();
            }
        }
    }