|
| ToJShadow () |
|
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) |
|
Definition at line 6 of file ToJShadow.cs.
◆ ToJShadow()
◆ ApplyShadow()
void ToJShadow.ApplyShadow |
( |
List< UIVertex > |
verts, |
|
|
Color32 |
color, |
|
|
int |
start, |
|
|
int |
end, |
|
|
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlineprotected |
Definition at line 115 of file ToJShadow.cs.
116 {
117 int num = verts.Count * 2;
118 if (verts.Capacity < num)
119 {
120 verts.Capacity = num;
121 }
123 }
void ApplyShadowZeroAlloc(List< UIVertex > verts, Color32 color, int start, int end, float x, float y)
References ApplyShadowZeroAlloc().
Referenced by ModifyMesh().
◆ ApplyShadowZeroAlloc()
void ToJShadow.ApplyShadowZeroAlloc |
( |
List< UIVertex > |
verts, |
|
|
Color32 |
color, |
|
|
int |
start, |
|
|
int |
end, |
|
|
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlineprotected |
Definition at line 90 of file ToJShadow.cs.
91 {
92 int num = verts.Count * 2;
93 if (verts.Capacity < num)
94 {
95 verts.Capacity = num;
96 }
97 for (int i = start; i < end; i++)
98 {
99 UIVertex uIVertex = verts[i];
100 verts.Add(uIVertex);
101 Vector3 position = uIVertex.position;
102 position.x += x;
103 position.y += y;
104 uIVertex.position = position;
105 Color32 color2 = color;
107 {
108 color2.a = (byte)(color2.a * verts[i].color.a / 255);
109 }
110 uIVertex.color = color2;
111 verts[i] = uIVertex;
112 }
113 }
References m_UseGraphicAlpha.
Referenced by ApplyShadow().
◆ ModifyMesh()
override void ToJShadow.ModifyMesh |
( |
VertexHelper |
vh | ) |
|
|
inline |
Definition at line 125 of file ToJShadow.cs.
126 {
127 if (!IsActive())
128 {
129 return;
130 }
134 Text component = GetComponent<Text>();
135 if (component != null && component.material.shader == Shader.Find("Text Effects/Fancy Text"))
136 {
137 for (int i = 0; i < m_Verts.Count - count; i++)
138 {
140 value.uv1 = new Vector2(0f, 0f);
142 }
143 }
144 vh.Clear();
145 vh.AddUIVertexTriangleStream(
m_Verts);
146 }
void ApplyShadow(List< UIVertex > verts, Color32 color, int start, int end, float x, float y)
References ApplyShadow(), effectColor, effectDistance, and m_Verts.
◆ m_EffectColor
Color ToJShadow.m_EffectColor = new Color(0f, 0f, 0f, 0.5f) |
|
private |
◆ m_EffectDistance
Vector2 ToJShadow.m_EffectDistance = new Vector2(1f, -1f) |
|
private |
◆ m_UseGraphicAlpha
bool ToJShadow.m_UseGraphicAlpha = true |
|
private |
◆ m_Verts
List<UIVertex> ToJShadow.m_Verts = new List<UIVertex>() |
|
private |
◆ effectColor
Color ToJShadow.effectColor |
|
getset |
Definition at line 19 of file ToJShadow.cs.
20 {
21 get
22 {
24 }
25 set
26 {
28 if (base.graphic != null)
29 {
30 base.graphic.SetVerticesDirty();
31 }
32 }
33 }
Referenced by ModifyMesh().
◆ effectDistance
Vector2 ToJShadow.effectDistance |
|
getset |
Definition at line 35 of file ToJShadow.cs.
36 {
37 get
38 {
40 }
41 set
42 {
43 if (value.x > 600f)
44 {
45 value.x = 600f;
46 }
47 if (value.x < -600f)
48 {
49 value.x = -600f;
50 }
51 if (value.y > 600f)
52 {
53 value.y = 600f;
54 }
55 if (value.y < -600f)
56 {
57 value.y = -600f;
58 }
60 {
62 if (base.graphic != null)
63 {
64 base.graphic.SetVerticesDirty();
65 }
66 }
67 }
68 }
Referenced by ModifyMesh().
◆ useGraphicAlpha
bool ToJShadow.useGraphicAlpha |
|
getset |
Definition at line 70 of file ToJShadow.cs.
71 {
72 get
73 {
75 }
76 set
77 {
79 if (base.graphic != null)
80 {
81 base.graphic.SetVerticesDirty();
82 }
83 }
84 }
The documentation for this class was generated from the following file: