Exemple #1
0
        static StackObject *Add_1(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, 4);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Boolean @usePercent = ptr_of_this_method->Value == 1;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            FairyGUI.RelationType @relationType = (FairyGUI.RelationType) typeof(FairyGUI.RelationType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            FairyGUI.GObject @target = (FairyGUI.GObject) typeof(FairyGUI.GObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            FairyGUI.Relations instance_of_this_method = (FairyGUI.Relations) typeof(FairyGUI.Relations).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Add(@target, @relationType, @usePercent);

            return(__ret);
        }
        static int _m_Add(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                FairyGUI.Relations gen_to_be_invoked = (FairyGUI.Relations)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && translator.Assignable <FairyGUI.GObject>(L, 2) && translator.Assignable <FairyGUI.RelationType>(L, 3))
                {
                    FairyGUI.GObject      _target = (FairyGUI.GObject)translator.GetObject(L, 2, typeof(FairyGUI.GObject));
                    FairyGUI.RelationType _relationType; translator.Get(L, 3, out _relationType);

                    gen_to_be_invoked.Add(
                        _target,
                        _relationType);



                    return(0);
                }
                if (gen_param_count == 4 && translator.Assignable <FairyGUI.GObject>(L, 2) && translator.Assignable <FairyGUI.RelationType>(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
                {
                    FairyGUI.GObject      _target = (FairyGUI.GObject)translator.GetObject(L, 2, typeof(FairyGUI.GObject));
                    FairyGUI.RelationType _relationType; translator.Get(L, 3, out _relationType);
                    bool _usePercent = LuaAPI.lua_toboolean(L, 4);

                    gen_to_be_invoked.Add(
                        _target,
                        _relationType,
                        _usePercent);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to FairyGUI.Relations.Add!"));
        }