コード例 #1
0
 public override void ReadFrom(object obj)
 {
     base.ReadFrom(obj);
     if (obj == null)
     {
         return;
     }
     UnityEngine.UI.AspectRatioFitter o = (UnityEngine.UI.AspectRatioFitter)obj;
     aspectMode  = (uint)o.aspectMode;
     aspectRatio = o.aspectRatio;
 }
コード例 #2
0
 /// <summary>
 /// Write the specified value using the writer.
 /// </summary>
 /// <param name="value">Value.</param>
 /// <param name="writer">Writer.</param>
 public override void Write(object value, ISaveGameWriter writer)
 {
     UnityEngine.UI.AspectRatioFitter aspectRatioFitter = (UnityEngine.UI.AspectRatioFitter)value;
     writer.WriteProperty("aspectMode", aspectRatioFitter.aspectMode);
     writer.WriteProperty("aspectRatio", aspectRatioFitter.aspectRatio);
     writer.WriteProperty("useGUILayout", aspectRatioFitter.useGUILayout);
     writer.WriteProperty("enabled", aspectRatioFitter.enabled);
     writer.WriteProperty("tag", aspectRatioFitter.tag);
     writer.WriteProperty("name", aspectRatioFitter.name);
     writer.WriteProperty("hideFlags", aspectRatioFitter.hideFlags);
 }
コード例 #3
0
        static int _g_get_aspectMode(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.UI.AspectRatioFitter __cl_gen_to_be_invoked = (UnityEngine.UI.AspectRatioFitter)translator.FastGetCSObj(L, 1);
                translator.Push(L, __cl_gen_to_be_invoked.aspectMode);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
コード例 #4
0
        static int _s_set_aspectRatio(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.UI.AspectRatioFitter __cl_gen_to_be_invoked = (UnityEngine.UI.AspectRatioFitter)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.aspectRatio = (float)LuaAPI.lua_tonumber(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
コード例 #5
0
        static int _g_get_aspectRatio(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.UI.AspectRatioFitter gen_to_be_invoked = (UnityEngine.UI.AspectRatioFitter)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushnumber(L, gen_to_be_invoked.aspectRatio);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
コード例 #6
0
 public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects)
 {
     obj = base.WriteTo(obj, objects);
     if (obj == null)
     {
         return(null);
     }
     UnityEngine.UI.AspectRatioFitter o = (UnityEngine.UI.AspectRatioFitter)obj;
     o.aspectMode  = (UnityEngine.UI.AspectRatioFitter.AspectMode)aspectMode;
     o.aspectRatio = aspectRatio;
     return(o);
 }
コード例 #7
0
        static int _s_set_aspectMode(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.UI.AspectRatioFitter            gen_to_be_invoked = (UnityEngine.UI.AspectRatioFitter)translator.FastGetCSObj(L, 1);
                UnityEngine.UI.AspectRatioFitter.AspectMode gen_value; translator.Get(L, 2, out gen_value);
                gen_to_be_invoked.aspectMode = gen_value;
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
コード例 #8
0
        static StackObject *get_aspectMode_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.UI.AspectRatioFitter instance_of_this_method = (UnityEngine.UI.AspectRatioFitter) typeof(UnityEngine.UI.AspectRatioFitter).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.aspectMode;

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
コード例 #9
0
        static StackObject *SetLayoutVertical_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.UI.AspectRatioFitter instance_of_this_method = (UnityEngine.UI.AspectRatioFitter) typeof(UnityEngine.UI.AspectRatioFitter).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SetLayoutVertical();

            return(__ret);
        }
        static StackObject *get_aspectRatio_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.UI.AspectRatioFitter instance_of_this_method = (UnityEngine.UI.AspectRatioFitter) typeof(UnityEngine.UI.AspectRatioFitter).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.aspectRatio;

            __ret->ObjectType       = ObjectTypes.Float;
            *(float *)&__ret->Value = result_of_this_method;
            return(__ret + 1);
        }
コード例 #11
0
        static StackObject *set_aspectRatio_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @value = *(float *)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.UI.AspectRatioFitter instance_of_this_method = (UnityEngine.UI.AspectRatioFitter) typeof(UnityEngine.UI.AspectRatioFitter).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.aspectRatio = value;

            return(__ret);
        }
コード例 #12
0
        static int _m_SetLayoutVertical(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.UI.AspectRatioFitter __cl_gen_to_be_invoked = (UnityEngine.UI.AspectRatioFitter)translator.FastGetCSObj(L, 1);


            try {
                {
                    __cl_gen_to_be_invoked.SetLayoutVertical(  );



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
コード例 #13
0
        static int _m_IsAspectModeValid(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.UI.AspectRatioFitter gen_to_be_invoked = (UnityEngine.UI.AspectRatioFitter)translator.FastGetCSObj(L, 1);



                {
                    var gen_ret = gen_to_be_invoked.IsAspectModeValid(  );
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
コード例 #14
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.UI.AspectRatioFitter aspectRatioFitter = (UnityEngine.UI.AspectRatioFitter)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "aspectMode":
                    aspectRatioFitter.aspectMode = reader.ReadProperty <UnityEngine.UI.AspectRatioFitter.AspectMode> ();
                    break;

                case "aspectRatio":
                    aspectRatioFitter.aspectRatio = reader.ReadProperty <System.Single> ();
                    break;

                case "useGUILayout":
                    aspectRatioFitter.useGUILayout = reader.ReadProperty <System.Boolean> ();
                    break;

                case "enabled":
                    aspectRatioFitter.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    aspectRatioFitter.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    aspectRatioFitter.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    aspectRatioFitter.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
コード例 #15
0
 /// <summary>
 /// Read the data using the reader.
 /// </summary>
 /// <param name="reader">Reader.</param>
 public override object Read(ISaveGameReader reader)
 {
     UnityEngine.UI.AspectRatioFitter aspectRatioFitter = SaveGameType.CreateComponent <UnityEngine.UI.AspectRatioFitter> ();
     ReadInto(aspectRatioFitter, reader);
     return(aspectRatioFitter);
 }