示例#1
0
        static StackObject *set_onStateChanged_2(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);
            UnityEngine.CullingGroup.StateChanged @value = (UnityEngine.CullingGroup.StateChanged) typeof(UnityEngine.CullingGroup.StateChanged).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

            instance_of_this_method.onStateChanged = value;

            return(__ret);
        }
        static internal int checkDelegate(IntPtr l, int p, out UnityEngine.CullingGroup.StateChanged ua)
        {
            int op = extractFunction(l, p);

            if (LuaDLL.lua_isnil(l, p))
            {
                ua = null;
                return(op);
            }
            else if (LuaDLL.lua_isuserdata(l, p) == 1)
            {
                ua = (UnityEngine.CullingGroup.StateChanged)checkObj(l, p);
                return(op);
            }
            if (LuaDLL.lua_isnil(l, -1))
            {
                ua = null;
                return(op);
            }
            LuaDelegate ld;

            checkType(l, -1, out ld);
            LuaDLL.lua_pop(l, 1);
            if (ld.d != null)
            {
                ua = (UnityEngine.CullingGroup.StateChanged)ld.d;
                return(op);
            }

            l  = LuaState.get(l).L;
            ua = (UnityEngine.CullingGroupEvent a1) =>
            {
                int error = pushTry(l);

                pushValue(l, a1);
                ld.pcall(1, error);
                LuaDLL.lua_settop(l, error - 1);
            };
            ld.d = ua;
            return(op);
        }