protected void SetGridRepositionNow(GameObject gObj, bool flag = true)
        {
            ReflectionProduct prod = new ReflectionProduct (gObj, flag);
            prod.nGUICompName = "UIGrid";
            prod.nGUIProdName = "repositionNow";

            SetProdValue (prod);
        }
Esempio n. 2
0
        protected void SetGridRepositionNow(GameObject gObj, bool flag = true)
        {
            ReflectionProduct prod = new ReflectionProduct(gObj, flag);

            prod.nGUICompName = "UIGrid";
            prod.nGUIProdName = "repositionNow";

            SetProdValue(prod);
        }
        protected void SetButton2DSpriteValue(GameObject gObj, Sprite sprite)
        {
            ReflectionProduct prod = new ReflectionProduct (gObj, sprite);
            prod.nGUICompName = "UIButton";
            prod.nGUIProdName = "normalSprite2D";
            prod.uGUICompName = "Image";
            prod.uGUIProdName = "sprite";

            SetProdValue (prod);
        }
        protected void SetButtonEnabledValue(GameObject gObj, bool flag)
        {
            ReflectionProduct prod = new ReflectionProduct (gObj, flag);
            prod.nGUICompName = "UIButton";
            prod.nGUIProdName = "enabled";
            prod.uGUICompName = "Button";
            prod.uGUIProdName = "enabled";

            SetProdValue (prod);
        }
        protected void SetButtonDefaultColor(GameObject gObj, Color color)
        {
            ReflectionProduct prod = new ReflectionProduct (gObj, color);
            prod.nGUICompName = "UIButton";
            prod.nGUIProdName = "defaultColor";
            prod.uGUICompName = "Image";
            prod.uGUIProdName = "color";

            SetProdValue (prod);
        }
Esempio n. 6
0
        protected void SetLabelTextValue(GameObject gObj, string text)
        {
            ReflectionProduct prod = new ReflectionProduct(gObj, text);

            prod.nGUICompName = "UILabel";
            prod.nGUIProdName = "text";
            prod.uGUICompName = "Text";
            prod.uGUIProdName = "text";

            SetProdValue(prod);
        }
Esempio n. 7
0
        protected void SetButtonDefaultColor(GameObject gObj, Color color)
        {
            ReflectionProduct prod = new ReflectionProduct(gObj, color);

            prod.nGUICompName = "UIButton";
            prod.nGUIProdName = "defaultColor";
            prod.uGUICompName = "Image";
            prod.uGUIProdName = "color";

            SetProdValue(prod);
        }
Esempio n. 8
0
        protected void SetButtonEnabledValue(GameObject gObj, bool flag)
        {
            ReflectionProduct prod = new ReflectionProduct(gObj, flag);

            prod.nGUICompName = "UIButton";
            prod.nGUIProdName = "enabled";
            prod.uGUICompName = "Button";
            prod.uGUIProdName = "enabled";

            SetProdValue(prod);
        }
Esempio n. 9
0
        protected void SetScrollValue(GameObject gObj, float f)
        {
            ReflectionProduct prod = new ReflectionProduct(gObj, f);

            prod.nGUICompName = "UISlider";
            prod.nGUIProdName = "value";
            prod.uGUICompName = "Scrollbar";
            prod.uGUIProdName = "size";

            SetProdValue(prod);
        }
Esempio n. 10
0
        protected void SetButton2DSpriteValue(GameObject gObj, Sprite sprite)
        {
            ReflectionProduct prod = new ReflectionProduct(gObj, sprite);

            prod.nGUICompName = "UIButton";
            prod.nGUIProdName = "normalSprite2D";
            prod.uGUICompName = "Image";
            prod.uGUIProdName = "sprite";

            SetProdValue(prod);
        }
Esempio n. 11
0
        protected void SetInputValue(GameObject gObj, string text)
        {
            ReflectionProduct prod = new ReflectionProduct(gObj, text);

            prod.nGUICompName = "UIInput";
            prod.nGUIProdName = "value";
            prod.uGUICompName = "InputField";
            prod.uGUIProdName = "text";

            SetProdValue(prod);
        }
        protected string GetInputValue(GameObject gObj)
        {
            ReflectionProduct prod = new ReflectionProduct (gObj);
            prod.nGUICompName = "UIInput";
            prod.nGUIProdName = "value";
            prod.uGUICompName = "InputField";
            prod.uGUIProdName = "text";

            object obj = GetProdValue (prod);
            if (obj == null) {
                return "";
            } else {
                return obj.ToString ();
            }
        }
Esempio n. 13
0
        private void SetProdValue(ReflectionProduct prod)
        {
            // ngui
            Component component = prod.gObj.GetComponent(prod.nGUICompName);

            if (component != null)
            {
                Reflection.SetPropInvoke(component, prod.nGUIProdName, prod.data);
            }

            // ugui
            component = prod.gObj.GetComponent(prod.uGUICompName);
            if (component != null)
            {
                Reflection.SetPropInvoke(component, prod.uGUIProdName, prod.data);
            }
        }
Esempio n. 14
0
        private object GetProdValue(ReflectionProduct prod)
        {
            // ngui
            Component component = prod.gObj.GetComponent(prod.nGUICompName);

            if (component != null)
            {
                return(Reflection.GetPropValue(component, prod.nGUIProdName));
            }

            // ugui
            component = prod.gObj.GetComponent(prod.uGUICompName);
            if (component != null)
            {
                return(Reflection.GetPropValue(component, prod.uGUIProdName));
            }

            return(null);
        }
Esempio n. 15
0
        protected string GetInputValue(GameObject gObj)
        {
            ReflectionProduct prod = new ReflectionProduct(gObj);

            prod.nGUICompName = "UIInput";
            prod.nGUIProdName = "value";
            prod.uGUICompName = "InputField";
            prod.uGUIProdName = "text";

            object obj = GetProdValue(prod);

            if (obj == null)
            {
                return("");
            }
            else
            {
                return(obj.ToString());
            }
        }
        protected void SetLabelTextValue(GameObject gObj, string text)
        {
            ReflectionProduct prod = new ReflectionProduct (gObj, text);
            prod.nGUICompName = "UILabel";
            prod.nGUIProdName = "text";
            prod.uGUICompName = "Text";
            prod.uGUIProdName = "text";

            SetProdValue (prod);
        }
        private object GetProdValue(ReflectionProduct prod)
        {
            // ngui
            Component component = prod.gObj.GetComponent (prod.nGUICompName);
            if (component != null) {
                return Reflection.GetPropValue (component, prod.nGUIProdName);
            }

            // ugui
            component = prod.gObj.GetComponent (prod.uGUICompName);
            if (component != null) {
                return Reflection.GetPropValue (component, prod.uGUIProdName);
            }

            return null;
        }
        protected void SetScrollValue(GameObject gObj, float f)
        {
            ReflectionProduct prod = new ReflectionProduct (gObj, f);
            prod.nGUICompName = "UISlider";
            prod.nGUIProdName = "value";
            prod.uGUICompName = "Scrollbar";
            prod.uGUIProdName = "size";

            SetProdValue (prod);
        }
        protected void SetInputValue(GameObject gObj, string text)
        {
            ReflectionProduct prod = new ReflectionProduct (gObj, text);
            prod.nGUICompName = "UIInput";
            prod.nGUIProdName = "value";
            prod.uGUICompName = "InputField";
            prod.uGUIProdName = "text";

            SetProdValue (prod);
        }
        private void SetProdValue(ReflectionProduct prod)
        {
            // ngui
            Component component = prod.gObj.GetComponent (prod.nGUICompName);
            if (component != null) {
                Reflection.SetPropInvoke (component, prod.nGUIProdName, prod.data);
            }

            // ugui
            component = prod.gObj.GetComponent (prod.uGUICompName);
            if (component != null) {
                Reflection.SetPropInvoke (component, prod.uGUIProdName, prod.data);
            }
        }