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

◆ GetImmuneAlpha()

Color Terraria.Player.GetImmuneAlpha ( Color newColor,
float alphaReduction )
inline

Definition at line 54765 of file Player.cs.

54766 {
54767 //IL_0088: Unknown result type (might be due to invalid IL or missing references)
54768 //IL_008a: Unknown result type (might be due to invalid IL or missing references)
54769 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
54770 //IL_0045: Unknown result type (might be due to invalid IL or missing references)
54771 float num = (float)(255 - immuneAlpha) / 255f;
54772 if (alphaReduction > 0f)
54773 {
54774 num *= 1f - alphaReduction;
54775 }
54776 if (shimmerTransparency > 0f)
54777 {
54778 if ((double)shimmerTransparency >= 0.8)
54779 {
54780 return Color.Transparent;
54781 }
54785 }
54786 if (immuneAlpha > 125)
54787 {
54788 return Color.Transparent;
54789 }
54790 return Color.Multiply(newColor, num);
54791 }
float shimmerTransparency
Definition Player.cs:2493

References Terraria.Player.immuneAlpha, and Terraria.Player.shimmerTransparency.

Referenced by Terraria.DataStructures.PlayerDrawSet.BoringSetup_2(), and Terraria.Graphics.Renderers.LegacyPlayerRenderer.DrawGhost().

+ Here is the caller graph for this function: