示例#1
0
        public override void Modify(TMP_VertexHelper vertexHelper)
        {
            var quadCount = vertexHelper.Colors.Count / VertexCountPerQuad;

            for (int i = 0; i < quadCount; ++i)
            {
                var visible = i < visibleQuadCount;
                if (!visible)
                {
                    for (int j = 0; j < VertexCountPerQuad; ++j)
                    {
                        var index = i * VertexCountPerQuad + j;
                        vertexHelper.Colors[index] = Color.clear;
                    }
                }
            }
        }
示例#2
0
        protected override void ModifyQuad(TMP_VertexHelper vertexHelper, int startIndex, int count, float normalizedTime)
        {
            if (normalizedTime >= 1f)
            {
                return;
            }
            if (normalizedTime <= 0f)
            {
                return;
            }

            var h = normalizedTime * (1f - normalizedTime) * 4f * height;

            for (int i = 0; i < count; ++i)
            {
                var index = startIndex + i;

                vertexHelper.Vertices[index] += new Vector3(0f, h, 0f);
            }
        }
        protected override void ModifyQuad(TMP_VertexHelper vertexHelper, int startIndex, int count, float normalizedTime)
        {
            if (normalizedTime >= 1f)
            {
                return;
            }

            for (int i = 0; i < count; ++i)
            {
                var index = i + startIndex;
                if (normalizedTime <= 0f)
                {
                    vertexHelper.Colors[index] = Color.clear;
                }
                else
                {
                    var color = vertexHelper.Colors[index];
                    color.a *= normalizedTime;
                    vertexHelper.Colors[index] = color;
                }
            }
        }
示例#4
0
 public abstract void Modify(TMP_VertexHelper vertexHelper);