Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreateOutlines()

void Terraria.Graphics.Renderers.LegacyPlayerRenderer.CreateOutlines ( float alpha,
float scale,
Color borderColor )
inlineprivate

Definition at line 62 of file LegacyPlayerRenderer.cs.

63 {
65 {
66 return;
67 }
70 float num = 2f * scale;
71 Color color = borderColor;
72 color *= alpha * alpha;
74 black *= alpha * alpha;
76 for (int i = 0; i < list.Count; i++)
77 {
79 value.shader = colorOnlyShaderIndex;
80 value.color = black;
81 list[i] = value;
82 }
83 int num2 = 2;
85 for (int j = -num2; j <= num2; j++)
86 {
87 for (int k = -num2; k <= num2; k++)
88 {
89 if (Math.Abs(j) + Math.Abs(k) == num2)
90 {
91 vector = new Vector2((float)j * num, (float)k * num);
92 for (int l = 0; l < list.Count; l++)
93 {
95 item.position += vector;
97 }
98 }
99 }
100 }
101 for (int m = 0; m < list.Count; m++)
102 {
104 value2.shader = colorOnlyShaderIndex;
105 value2.color = color;
106 list[m] = value2;
107 }
109 num2 = 1;
110 for (int n = -num2; n <= num2; n++)
111 {
112 for (int num3 = -num2; num3 <= num2; num3++)
113 {
114 if (Math.Abs(n) + Math.Abs(num3) == num2)
115 {
116 vector = new Vector2((float)n * num, (float)num3 * num);
117 for (int num4 = 0; num4 < list.Count; num4++)
118 {
120 item2.position += vector;
122 }
123 }
124 }
125 }
127 }
void AddRange(IEnumerable< T > collection)
Definition List.cs:275
static double Abs(double value)
static Color Transparent
Definition Color.cs:76

References Terraria.Graphics.Renderers.LegacyPlayerRenderer._drawData, System.Math.Abs(), System.Collections.Generic.List< T >.Add(), System.Collections.Generic.List< T >.AddRange(), Microsoft.Xna.Framework.Color.Black, System.collection, Terraria.ID.ContentSamples.CommonlyUsedContentSamples.ColorOnlyShaderIndex, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.item, System.list, Microsoft.Xna.Framework.Color.Transparent, System.value, Microsoft.Xna.Framework.Graphics.Vector2, and Microsoft.Xna.Framework.Vector2.Zero.

Referenced by Terraria.Graphics.Renderers.LegacyPlayerRenderer.DrawPlayerHead().