Пример #1
0
    private sc_info_ui info_ui;                                                                               //UI of the info screen

    // Start is called before the first frame update
    void Start()
    {
        info_canvas         = sc_canvas.instance.info_canvas;
        gallery_canvas      = sc_canvas.instance.gallery_canvas;
        drawing_canvas      = sc_canvas.instance.drawing_canvas;
        color_picker_canvas = sc_canvas.instance.color_picker_canvas;
        idle_warning_canvas = sc_canvas.instance.idle_warning_canvas;

        drawing_ui      = FindObjectOfType <sc_drawing_ui>();
        gallery_ui      = FindObjectOfType <sc_gallery_ui>();
        color_picker_ui = FindObjectOfType <sc_color_picker_ui>();
        info_ui         = FindObjectOfType <sc_info_ui>();
    }
Пример #2
0
    // Start is called before the first frame update
    public void Start()
    {
        drawing_ui     = FindObjectOfType <sc_drawing_ui>();
        gallery_ui     = FindObjectOfType <sc_gallery_ui>();
        gallery_loader = FindObjectOfType <sc_gallery_loader>();
        info_canvas    = sc_canvas.instance.info_canvas;
        gallery_canvas = sc_canvas.instance.gallery_canvas;
        drawing_canvas = sc_canvas.instance.drawing_canvas;
        InfoButtons    = GameObject.FindGameObjectsWithTag("InfoButton");
        InfoRead       = new List <GameObject>(InfoButtons);

        init_UI();
    }
Пример #3
0
    public void Awake()
    {
        // avoid doubeling of this script
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
        }
        else
        {
            instance = this;
        }

        // read in historic texture version such that default is available
        historic_version = load_resource("Textures/Historic_Version", TextureFormat.ARGB32);
        grabstele        = GameObject.FindGameObjectWithTag("paintable");
        gallery_ui       = FindObjectOfType <sc_gallery_ui>();
    }
Пример #4
0
    private string info_name = "", info_age = "", info_sex = ""; //infos added while saving

    // Start is called before the first frame update
    public void Start()
    {
        color_picker_canvas = sc_canvas.instance.color_picker_canvas;
        gallery_canvas      = sc_canvas.instance.gallery_canvas;
        drawing_canvas      = sc_canvas.instance.drawing_canvas;
        drawing_script      = FindObjectOfType <sc_drawing_handler>();
        gallery_loader      = FindObjectOfType <sc_gallery_loader>();
        color_picker        = FindObjectOfType <sc_color_picker_ui>();
        gallery_ui          = FindObjectOfType <sc_gallery_ui>();
        name_input          = save_dialog.transform.Find("NameInput").GetComponent <InputField>();
        age_input           = save_dialog.transform.Find("AgeInput").GetComponent <InputField>();
        sex_input           = save_dialog.transform.Find("SexDropdown").GetComponent <Dropdown>();
        brush_button.transform.Find("BrushIcon").Find("BrushHead").GetComponent <Image>().color        = drawing_script.default_color;
        bucket_button.transform.Find("BucketIcon").Find("BucketContents").GetComponent <Image>().color = drawing_script.default_color;
        drawing_script.drawing_color = drawing_script.default_color;

        brush_size_slider.GetComponent <Slider>().value = (drawing_script.get_tool("brush") as sc_tool_brush).brush_size;
    }
Пример #5
0
    private sc_gallery_ui instance;   //singelton to avoid dublication

    // Start is called before the first frame update
    public void Start()
    {
        // avoid doubeling of this script
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
        }
        else
        {
            instance = this;
        }

        info_canvas    = sc_canvas.instance.info_canvas;
        gallery_canvas = sc_canvas.instance.gallery_canvas;
        drawing_canvas = sc_canvas.instance.drawing_canvas;
        gallery_loader = FindObjectOfType <sc_gallery_loader>();
        drawing_ui     = FindObjectOfType <sc_drawing_ui>();
        info_ui        = FindObjectOfType <sc_info_ui>();
    }
Пример #6
0
    private sc_gallery_loader gallery_loader;   //script responsible for loading the texture files

    // Start is called before the first frame update
    void Awake()
    {
        rotation_script   = GameObject.FindGameObjectWithTag("paintable").GetComponent <sc_swipe_draggable>();
        gallery_ui_script = FindObjectOfType <sc_gallery_ui>();
        gallery_loader    = FindObjectOfType <sc_gallery_loader>();
    }