Пример #1
0
        static StackObject *GetPixel_9(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, 4);

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

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 @x = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.CubemapFace @face = (UnityEngine.CubemapFace) typeof(UnityEngine.CubemapFace).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

            var result_of_this_method = instance_of_this_method.GetPixel(@face, @x, @y);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Пример #2
0
        static int _m_CreateExternalTexture_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    int _width = LuaAPI.xlua_tointeger(L, 1);
                    UnityEngine.TextureFormat _format; translator.Get(L, 2, out _format);
                    bool          _mipmap    = LuaAPI.lua_toboolean(L, 3);
                    System.IntPtr _nativeTex = LuaAPI.lua_touserdata(L, 4);

                    UnityEngine.Cubemap gen_ret = UnityEngine.Cubemap.CreateExternalTexture(_width, _format, _mipmap, _nativeTex);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Пример #3
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Experimental.Rendering.DefaultFormat>(L, 3) && translator.Assignable <UnityEngine.Experimental.Rendering.TextureCreationFlags>(L, 4))
                {
                    int _width = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Experimental.Rendering.DefaultFormat        _format; translator.Get(L, 3, out _format);
                    UnityEngine.Experimental.Rendering.TextureCreationFlags _flags; translator.Get(L, 4, out _flags);

                    var gen_ret = new UnityEngine.Cubemap(_width, _format, _flags);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Experimental.Rendering.GraphicsFormat>(L, 3) && translator.Assignable <UnityEngine.Experimental.Rendering.TextureCreationFlags>(L, 4))
                {
                    int _width = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Experimental.Rendering.GraphicsFormat       _format; translator.Get(L, 3, out _format);
                    UnityEngine.Experimental.Rendering.TextureCreationFlags _flags; translator.Get(L, 4, out _flags);

                    var gen_ret = new UnityEngine.Cubemap(_width, _format, _flags);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.TextureFormat>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    int _width = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.TextureFormat _format; translator.Get(L, 3, out _format);
                    int _mipCount = LuaAPI.xlua_tointeger(L, 4);

                    var gen_ret = new UnityEngine.Cubemap(_width, _format, _mipCount);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 5 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Experimental.Rendering.GraphicsFormat>(L, 3) && translator.Assignable <UnityEngine.Experimental.Rendering.TextureCreationFlags>(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
                {
                    int _width = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Experimental.Rendering.GraphicsFormat       _format; translator.Get(L, 3, out _format);
                    UnityEngine.Experimental.Rendering.TextureCreationFlags _flags; translator.Get(L, 4, out _flags);
                    int _mipCount = LuaAPI.xlua_tointeger(L, 5);

                    var gen_ret = new UnityEngine.Cubemap(_width, _format, _flags, _mipCount);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.TextureFormat>(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
                {
                    int _width = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.TextureFormat _textureFormat; translator.Get(L, 3, out _textureFormat);
                    bool _mipChain = LuaAPI.lua_toboolean(L, 4);

                    var gen_ret = new UnityEngine.Cubemap(_width, _textureFormat, _mipChain);
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Cubemap constructor!"));
        }