Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
SoftShadow Class Reference
Inheritance diagram for SoftShadow:

Public Member Functions

override void ModifyMesh (VertexHelper vh)
 

Protected Member Functions

 SoftShadow ()
 

Properties

float blurSpread [get, set]
 
bool onlyInitialCharactersDropShadow [get, set]
 

Private Attributes

float m_BlurSpread = 1f
 
bool m_OnlyInitialCharactersDropShadow = true
 
List< UIVertex > m_Verts = new List<UIVertex>()
 

Detailed Description

Definition at line 7 of file SoftShadow.cs.

Constructor & Destructor Documentation

◆ SoftShadow()

SoftShadow.SoftShadow ( )
inlineprotected

Definition at line 49 of file SoftShadow.cs.

50 {
51 }

Member Function Documentation

◆ ModifyMesh()

override void SoftShadow.ModifyMesh ( VertexHelper  vh)
inline

Definition at line 53 of file SoftShadow.cs.

54 {
55 if (!IsActive())
56 {
57 return;
58 }
59 vh.GetUIVertexStream(m_Verts);
60 int count = m_Verts.Count;
61 Text component = GetComponent<Text>();
62 int num = 0;
63 int num2 = m_Verts.Count;
65 {
66 num = m_Verts.Count - component.cachedTextGenerator.characterCountVisible * 6;
67 num2 = component.cachedTextGenerator.characterCountVisible * 6;
68 }
69 Color color = base.effectColor;
70 color.a /= 4f;
71 int start = num;
72 int count2 = m_Verts.Count;
73 ApplyShadowZeroAlloc(m_Verts, color, start, m_Verts.Count, base.effectDistance.x, base.effectDistance.y);
74 for (int i = -1; i <= 1; i++)
75 {
76 for (int j = -1; j <= 1; j++)
77 {
78 if (i != 0 || j != 0)
79 {
80 start = count2;
81 count2 = m_Verts.Count;
82 ApplyShadowZeroAlloc(m_Verts, color, start, m_Verts.Count, base.effectDistance.x + (float)i * blurSpread, base.effectDistance.y + (float)j * blurSpread);
83 }
84 }
85 }
87 {
88 List<UIVertex> range = m_Verts.GetRange(0, count - num2);
89 m_Verts.RemoveRange(0, count - num2);
90 m_Verts.InsertRange(m_Verts.Count - num2, range);
91 }
92 if (component.material.shader == Shader.Find("Text Effects/Fancy Text"))
93 {
94 for (int k = 0; k < m_Verts.Count - count; k++)
95 {
96 UIVertex value = m_Verts[k];
97 value.uv1 = new Vector2(0f, 0f);
98 m_Verts[k] = value;
99 }
100 }
101 vh.Clear();
102 vh.AddUIVertexTriangleStream(m_Verts);
103 }
bool onlyInitialCharactersDropShadow
Definition: SoftShadow.cs:34
float blurSpread
Definition: SoftShadow.cs:18
List< UIVertex > m_Verts
Definition: SoftShadow.cs:15
bool m_OnlyInitialCharactersDropShadow
Definition: SoftShadow.cs:13

References blurSpread, Color, m_OnlyInitialCharactersDropShadow, m_Verts, and onlyInitialCharactersDropShadow.

Member Data Documentation

◆ m_BlurSpread

float SoftShadow.m_BlurSpread = 1f
private

Definition at line 10 of file SoftShadow.cs.

◆ m_OnlyInitialCharactersDropShadow

bool SoftShadow.m_OnlyInitialCharactersDropShadow = true
private

Definition at line 13 of file SoftShadow.cs.

Referenced by ModifyMesh().

◆ m_Verts

List<UIVertex> SoftShadow.m_Verts = new List<UIVertex>()
private

Definition at line 15 of file SoftShadow.cs.

Referenced by ModifyMesh().

Property Documentation

◆ blurSpread

float SoftShadow.blurSpread
getset

Definition at line 17 of file SoftShadow.cs.

18 {
19 get
20 {
21 return m_BlurSpread;
22 }
23 set
24 {
25 m_BlurSpread = value;
26 if (base.graphic != null)
27 {
28 base.graphic.SetVerticesDirty();
29 }
30 }
31 }
float m_BlurSpread
Definition: SoftShadow.cs:10

Referenced by ModifyMesh().

◆ onlyInitialCharactersDropShadow

bool SoftShadow.onlyInitialCharactersDropShadow
getset

Definition at line 33 of file SoftShadow.cs.

34 {
35 get
36 {
38 }
39 set
40 {
42 if (base.graphic != null)
43 {
44 base.graphic.SetVerticesDirty();
45 }
46 }
47 }

Referenced by ModifyMesh().


The documentation for this class was generated from the following file: