Esempio n. 1
0
    public GUIController()
    {
        if (instance != null)
        {
            objects           = new List <GUIObject> ();
            objectsDictionary = new Dictionary <GameObject, GUIButton> ();
            isButtonDown      = false;
            return;
        }

        instance = this;

        objects           = new List <GUIObject> ();
        objectsDictionary = new Dictionary <GameObject, GUIButton> ();
        isButtonDown      = false;

        UpdateController.AddClickListener("OnClick", "GUIOnClick", OnClick);
        UpdateController.AddClickListener("OnButtonDown", "GUIOnButtonDown", OnButtonDown);
        UpdateController.AddClickListener("OnButtonUp", "GUIOnButtonUp", (v) => { OnButtonUp(); });
        UpdateController.AddClickListener("OnOver", "GUIOnOver", OnOver);
    }