1using System.Collections.Generic;
5[AddComponentMenu(
"UI/ToJ Effects/ToJ Shadow", 14)]
17 private List<UIVertex>
m_Verts =
new List<UIVertex>();
28 if (base.graphic !=
null)
30 base.graphic.SetVerticesDirty();
62 if (base.graphic !=
null)
64 base.graphic.SetVerticesDirty();
79 if (base.graphic !=
null)
81 base.graphic.SetVerticesDirty();
90 protected void ApplyShadowZeroAlloc(List<UIVertex> verts, Color32 color,
int start,
int end,
float x,
float y)
92 int num = verts.Count * 2;
93 if (verts.Capacity < num)
97 for (
int i = start; i < end; i++)
99 UIVertex uIVertex = verts[i];
101 Vector3 position = uIVertex.position;
104 uIVertex.position = position;
105 Color32 color2 = color;
108 color2.a = (byte)(color2.a * verts[i].color.a / 255);
110 uIVertex.color = color2;
115 protected void ApplyShadow(List<UIVertex> verts, Color32 color,
int start,
int end,
float x,
float y)
117 int num = verts.Count * 2;
118 if (verts.Capacity < num)
120 verts.Capacity = num;
134 Text component = GetComponent<Text>();
135 if (component !=
null && component.material.shader == Shader.Find(
"Text Effects/Fancy Text"))
137 for (
int i = 0; i < m_Verts.Count - count; i++)
140 value.uv1 =
new Vector2(0f, 0f);
145 vh.AddUIVertexTriangleStream(
m_Verts);
void ApplyShadowZeroAlloc(List< UIVertex > verts, Color32 color, int start, int end, float x, float y)
void ApplyShadow(List< UIVertex > verts, Color32 color, int start, int end, float x, float y)
override void ModifyMesh(VertexHelper vh)