static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    UnityEngine.UI.VertexHelper __cl_gen_ret = new UnityEngine.UI.VertexHelper();
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <UnityEngine.Mesh>(L, 2))
                {
                    UnityEngine.Mesh m = (UnityEngine.Mesh)translator.GetObject(L, 2, typeof(UnityEngine.Mesh));

                    UnityEngine.UI.VertexHelper __cl_gen_ret = new UnityEngine.UI.VertexHelper(m);
                    translator.Push(L, __cl_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.UI.VertexHelper constructor!"));
        }
        static int _m_AddTriangle(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    int _idx0 = LuaAPI.xlua_tointeger(L, 2);
                    int _idx1 = LuaAPI.xlua_tointeger(L, 3);
                    int _idx2 = LuaAPI.xlua_tointeger(L, 4);

                    gen_to_be_invoked.AddTriangle(_idx0, _idx1, _idx2);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_PopulateUIVertex(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


            try {
                {
                    UnityEngine.UIVertex vertex; translator.Get(L, 2, out vertex);
                    int i = LuaAPI.xlua_tointeger(L, 3);

                    __cl_gen_to_be_invoked.PopulateUIVertex(ref vertex, i);
                    translator.Push(L, vertex);
                    translator.Update(L, 2, vertex);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
示例#4
0
 internal sealed override void AddTo(UnityEngine.UI.VertexHelper helper)
 {
     if (Verts != null)
     {
         helper.AddUIVertexTriangleStream(Verts.Select(Map).ToList());
     }
 }
        static StackObject *AddVert_8(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);
            UnityEngine.Vector2 @uv0 = (UnityEngine.Vector2) typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

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

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

            instance_of_this_method.AddVert(@position, @color, @uv0);

            return(__ret);
        }
示例#6
0
文件: Text.cs 项目: radtek/HinxCor
        protected override void OnPopulateMesh(UnityEngine.UI.VertexHelper toFill)
        {
            if (font == null)
            {
                return;
            }

            // We don't care if we the font Texture changes while we are doing our Update.
            // The end result of cachedTextGenerator will be valid for this instance.
            // Otherwise we can get issues like Case 619238.
            m_DisableFontTextureRebuiltCallback = true;

            Vector2 extents = rectTransform.rect.size;

            var settings = GetGenerationSettings(extents);

            cachedTextGenerator.PopulateWithErrors(text, settings, gameObject);

            // Apply the offset to the vertices
            IList <UIVertex> verts         = cachedTextGenerator.verts;
            float            unitsPerPixel = 1 / pixelsPerUnit;
            //Last 4 verts are always a new line... (\n)
            int vertCount = verts.Count - 4;

            Vector2 roundingOffset = new Vector2(verts[0].position.x, verts[0].position.y) * unitsPerPixel;

            roundingOffset = PixelAdjustPoint(roundingOffset) - roundingOffset;
            toFill.Clear();
            if (roundingOffset != Vector2.zero)
            {
                for (int i = 0; i < vertCount; ++i)
                {
                    int tempVertsIndex = i & 3;
                    m_TempVerts[tempVertsIndex]             = verts[i];
                    m_TempVerts[tempVertsIndex].position   *= unitsPerPixel;
                    m_TempVerts[tempVertsIndex].position.x += roundingOffset.x;
                    m_TempVerts[tempVertsIndex].position.y += roundingOffset.y;
                    if (tempVertsIndex == 3)
                    {
                        toFill.AddUIVertexQuad(m_TempVerts);
                    }
                }
            }
            else
            {
                for (int i = 0; i < vertCount; ++i)
                {
                    int tempVertsIndex = i & 3;
                    m_TempVerts[tempVertsIndex]           = verts[i];
                    m_TempVerts[tempVertsIndex].position *= unitsPerPixel;
                    if (tempVertsIndex == 3)
                    {
                        toFill.AddUIVertexQuad(m_TempVerts);
                    }
                }
            }

            m_DisableFontTextureRebuiltCallback = false;
        }
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *__ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new UnityEngine.UI.VertexHelper();

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
示例#8
0
        /// <inheritdoc />
        protected override void OnPopulateMesh(UnityEngine.UI.VertexHelper helper)
        {
            helper.Clear();

            foreach (var item in items)
            {
                item.AddTo(helper);
            }
        }
        static int _m_AddVert(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 2 && translator.Assignable <UnityEngine.UIVertex>(L, 2))
                {
                    UnityEngine.UIVertex v; translator.Get(L, 2, out v);

                    __cl_gen_to_be_invoked.AddVert(v);



                    return(0);
                }
                if (__gen_param_count == 4 && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Color32>(L, 3) && translator.Assignable <UnityEngine.Vector2>(L, 4))
                {
                    UnityEngine.Vector3 position; translator.Get(L, 2, out position);
                    UnityEngine.Color32 color; translator.Get(L, 3, out color);
                    UnityEngine.Vector2 uv0; translator.Get(L, 4, out uv0);

                    __cl_gen_to_be_invoked.AddVert(position, color, uv0);



                    return(0);
                }
                if (__gen_param_count == 7 && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Color32>(L, 3) && translator.Assignable <UnityEngine.Vector2>(L, 4) && translator.Assignable <UnityEngine.Vector2>(L, 5) && translator.Assignable <UnityEngine.Vector3>(L, 6) && translator.Assignable <UnityEngine.Vector4>(L, 7))
                {
                    UnityEngine.Vector3 position; translator.Get(L, 2, out position);
                    UnityEngine.Color32 color; translator.Get(L, 3, out color);
                    UnityEngine.Vector2 uv0; translator.Get(L, 4, out uv0);
                    UnityEngine.Vector2 uv1; translator.Get(L, 5, out uv1);
                    UnityEngine.Vector3 normal; translator.Get(L, 6, out normal);
                    UnityEngine.Vector4 tangent; translator.Get(L, 7, out tangent);

                    __cl_gen_to_be_invoked.AddVert(position, color, uv0, uv1, normal, tangent);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.UI.VertexHelper.AddVert!"));
        }
示例#10
0
        static int _m_AddVert(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <UnityEngine.UIVertex>(L, 2))
                {
                    UnityEngine.UIVertex _v; translator.Get(L, 2, out _v);

                    gen_to_be_invoked.AddVert(_v);



                    return(0);
                }
                if (gen_param_count == 4 && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Color32>(L, 3) && translator.Assignable <UnityEngine.Vector2>(L, 4))
                {
                    UnityEngine.Vector3 _position; translator.Get(L, 2, out _position);
                    UnityEngine.Color32 _color; translator.Get(L, 3, out _color);
                    UnityEngine.Vector2 _uv0; translator.Get(L, 4, out _uv0);

                    gen_to_be_invoked.AddVert(_position, _color, _uv0);



                    return(0);
                }
                if (gen_param_count == 7 && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Color32>(L, 3) && translator.Assignable <UnityEngine.Vector2>(L, 4) && translator.Assignable <UnityEngine.Vector2>(L, 5) && translator.Assignable <UnityEngine.Vector3>(L, 6) && translator.Assignable <UnityEngine.Vector4>(L, 7))
                {
                    UnityEngine.Vector3 _position; translator.Get(L, 2, out _position);
                    UnityEngine.Color32 _color; translator.Get(L, 3, out _color);
                    UnityEngine.Vector2 _uv0; translator.Get(L, 4, out _uv0);
                    UnityEngine.Vector2 _uv1; translator.Get(L, 5, out _uv1);
                    UnityEngine.Vector3 _normal; translator.Get(L, 6, out _normal);
                    UnityEngine.Vector4 _tangent; translator.Get(L, 7, out _tangent);

                    gen_to_be_invoked.AddVert(_position, _color, _uv0, _uv1, _normal, _tangent);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.UI.VertexHelper.AddVert!"));
        }
        static int _g_get_currentIndexCount(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.UI.VertexHelper __cl_gen_to_be_invoked = (UnityEngine.UI.VertexHelper)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, __cl_gen_to_be_invoked.currentIndexCount);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
示例#12
0
        public override void ModifyMesh(UnityEngine.UI.VertexHelper helper)
        {
            var verts = ListPool <UIVertex> .Get();

            if (m_image == null)
            {
                return;
            }
            helper.GetUIVertexStream(verts);
            int count = verts.Count;

            helper.Clear();
            var   overrideSprite = m_image.overrideSprite;
            var   spriteSize     = overrideSprite.rect.size;
            float tileWidth      = spriteSize.x / m_image.pixelsPerUnit;
            float tileHeight     = spriteSize.y / m_image.pixelsPerUnit;
            var   leftTopUV      = Vector2.Min(verts[1].uv0, verts[4].uv0);
            var   rightBottomUV  = Vector2.Max(verts[1].uv0, verts[4].uv0);

            border = new Vector4(leftTopUV.x, leftTopUV.y, rightBottomUV.x, rightBottomUV.y);
            // for (int i = 0; i < shapeCount; ++i)
            {
                var rectBorder = verts[1].position - verts[4].position;
                rectBorder = new Vector3(Mathf.Abs(rectBorder.x), Mathf.Abs(rectBorder.y), Mathf.Abs(rectBorder.z));
                bool bTileVertical   = IsTileVertical;
                bool bTileHorizontal = IsTileHorizontal;
                for (int j = 0; j < 6; ++j)
                {
                    var index = j;
                    var vert  = verts[index];
                    var uv0   = vert.uv0;
                    //uv0.x = (uv0.x - leftTopUV.x) * rectBorder.x / tileWidth;
                    var uv1 = Vector2.one;
                    if (bTileVertical && tileHeight != 0)
                    {
                        uv1.y = ((tileHeight == 0 || tileHeight >= rectBorder.y) ? 1f : rectBorder.y / tileHeight);
                    }
                    if (bTileHorizontal && tileWidth != 0)
                    {
                        uv1.x = ((tileWidth == 0 || tileWidth >= rectBorder.x) ? 1f : rectBorder.x / tileWidth);
                    }
                    vert.uv0     = uv0;
                    vert.uv1     = uv1;
                    verts[index] = vert;
                }
            }
            m_image.material.SetVector("_Border", border);
            helper.Clear();
            helper.AddUIVertexTriangleStream(verts);
            verts.ReleaseToPool();
        }
        static StackObject *Clear_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, 1);

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

            instance_of_this_method.Clear();

            return(__ret);
        }
示例#14
0
        static StackObject *Ctor_1(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.Mesh m = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = new UnityEngine.UI.VertexHelper(m);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
示例#15
0
        internal sealed override void AddTo(UnityEngine.UI.VertexHelper helper)
        {
            if (Verts != null)
            {
                var count = helper.currentVertCount;

                foreach (var vert in Verts)
                {
                    helper.AddVert(Map(vert));
                }

                helper.AddTriangle(count, count + 1, count + 2);
                helper.AddTriangle(count + 2, count + 3, count);
            }
        }
        static StackObject *get_currentIndexCount_3(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.VertexHelper instance_of_this_method = (UnityEngine.UI.VertexHelper) typeof(UnityEngine.UI.VertexHelper).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.currentIndexCount;

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method;
            return(__ret + 1);
        }
示例#17
0
        static StackObject *AddVert_0(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, 9);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Vector4 @tangent = (UnityEngine.Vector4) typeof(UnityEngine.Vector4).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

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

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

            ptr_of_this_method = ILIntepreter.Minus(__esp, 5);
            UnityEngine.Vector2 @uv1 = (UnityEngine.Vector2) typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 6);
            UnityEngine.Vector2 @uv0 = (UnityEngine.Vector2) typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 7);
            UnityEngine.Color32 @color = (UnityEngine.Color32) typeof(UnityEngine.Color32).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 8);
            UnityEngine.Vector3 @position = (UnityEngine.Vector3) typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 9);
            UnityEngine.UI.VertexHelper @obj = (UnityEngine.UI.VertexHelper) typeof(UnityEngine.UI.VertexHelper).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);


            UnityEngine.Experimental.UI.VertexHelperExtension.AddVert(@obj, @position, @color, @uv0, @uv1, @uv2, @uv3, @normal, @tangent);

            return(__ret);
        }
        static StackObject *ModifyMesh_6(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.UI.VertexHelper @vh = (UnityEngine.UI.VertexHelper) typeof(UnityEngine.UI.VertexHelper).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

            instance_of_this_method.ModifyMesh(@vh);

            return(__ret);
        }
        static StackObject *GetUIVertexStream_14(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, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Collections.Generic.List <UnityEngine.UIVertex> @stream = (System.Collections.Generic.List <UnityEngine.UIVertex>) typeof(System.Collections.Generic.List <UnityEngine.UIVertex>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

            instance_of_this_method.GetUIVertexStream(@stream);

            return(__ret);
        }
示例#20
0
        static StackObject *AddUIVertexQuad_12(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.UIVertex[] @verts = (UnityEngine.UIVertex[]) typeof(UnityEngine.UIVertex[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

            instance_of_this_method.AddUIVertexQuad(@verts);

            return(__ret);
        }
示例#21
0
 protected override void OnPopulateMesh(UnityEngine.UI.VertexHelper vh)
 {
     if (buffer.modified)
     {
         buffer.modified = false;
         vh.Clear();
         int             count    = rectangleCount * 4;
         List <UIVertex> vertices = new List <UIVertex>();
         for (int i = 0; i < count; i += 4)
         {
             vertices.Add(buffer.vertices[i + 0]);
             vertices.Add(buffer.vertices[i + 1]);
             vertices.Add(buffer.vertices[i + 2]);
             vertices.Add(buffer.vertices[i + 2]);
             vertices.Add(buffer.vertices[i + 3]);
             vertices.Add(buffer.vertices[i + 0]);
         }
         vh.AddUIVertexTriangleStream(vertices);
     }
 }
        static int _m_Clear(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


            try {
                {
                    __cl_gen_to_be_invoked.Clear(  );



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


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



                {
                    gen_to_be_invoked.Dispose(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static StackObject *SetUIVertex_5(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, 3);

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

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

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

            instance_of_this_method.SetUIVertex(@vertex, @i);

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


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


            try {
                {
                    UnityEngine.UI.VertexHelper vh = (UnityEngine.UI.VertexHelper)translator.GetObject(L, 2, typeof(UnityEngine.UI.VertexHelper));

                    __cl_gen_to_be_invoked.ModifyMesh(vh);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_GetUIVertexStream(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


            try {
                {
                    System.Collections.Generic.List <UnityEngine.UIVertex> stream = (System.Collections.Generic.List <UnityEngine.UIVertex>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List <UnityEngine.UIVertex>));

                    __cl_gen_to_be_invoked.GetUIVertexStream(stream);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_AddUIVertexQuad(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


            try {
                {
                    UnityEngine.UIVertex[] verts = (UnityEngine.UIVertex[])translator.GetObject(L, 2, typeof(UnityEngine.UIVertex[]));

                    __cl_gen_to_be_invoked.AddUIVertexQuad(verts);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
示例#28
0
        protected override void OnPopulateMesh(UnityEngine.UI.VertexHelper vh)
        {
            base.OnPopulateMesh(vh);
            var verts = ListPool <UnityEngine.UIVertex> .Get();

            vh.GetUIVertexStream(verts);
            var spriteTagCount = spriteTagList.Count;

            for (int i = 0; i < spriteTagCount; ++i)
            {
                var spriteTag = spriteTagList[i];
                spriteTag.active = true;
                var vertStart = spriteTag.index * 6;
                if (vertStart >= verts.Count)
                {
                    spriteTag.active = false;
                    continue;
                }
                var posLT = verts[vertStart].position;
                var posRB = verts[vertStart + 2].position;
                spriteTag.position = (posLT + posRB) * 0.5f;
                for (int j = 0; j < 6; ++j)
                {
                    int index = spriteTag.index * 6 + j;
                    var vert  = verts[index];
                    vert.uv0     = Vector2.zero;
                    vert.color   = new Color(0, 0, 0, 0);
                    verts[index] = vert;
                }
                spriteTagList[i] = spriteTag;
            }

            spriteTagChanged = true;

            vh.Clear();
            vh.AddUIVertexTriangleStream(verts);
            verts.ReleaseToPool();
        }
        static int _m_AddUIVertexTriangleStream(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    System.Collections.Generic.List <UnityEngine.UIVertex> _verts = (System.Collections.Generic.List <UnityEngine.UIVertex>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List <UnityEngine.UIVertex>));

                    gen_to_be_invoked.AddUIVertexTriangleStream(_verts);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_FillMesh(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    UnityEngine.Mesh _mesh = (UnityEngine.Mesh)translator.GetObject(L, 2, typeof(UnityEngine.Mesh));

                    gen_to_be_invoked.FillMesh(_mesh);



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