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

◆ CurrentLiquidColor

Color Terraria.ID.Colors.CurrentLiquidColor
staticget

Definition at line 97 of file Colors.cs.

98 {
99 get
100 {
101 Color color = Color.Transparent;
102 bool flag = true;
103 for (int i = 0; i < 11; i++)
104 {
105 if (Main.liquidAlpha[i] > 0f)
106 {
107 if (flag)
108 {
109 flag = false;
110 color = _liquidColors[i];
111 }
112 else
113 {
114 color = Color.Lerp(color, _liquidColors[i], Main.liquidAlpha[i]);
115 }
116 }
117 }
118 return color;
119 }
120 }
static readonly Color[] _liquidColors
Definition Colors.cs:75
static Color Transparent
Definition Color.cs:76
static Color Lerp(Color value1, Color value2, float amount)
Definition Color.cs:491

Referenced by Terraria.Mount.Draw(), and Terraria.Mount.UpdateEffects().