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

◆ Opacity

float Terraria.NPC.Opacity
getset

Definition at line 1516 of file NPC.cs.

1517 {
1518 get
1519 {
1520 return 1f - (float)alpha / 255f;
1521 }
1522 set
1523 {
1524 alpha = (int)MathHelper.Clamp((1f - value) * 255f, 0f, 255f);
1525 }
1526 }
float value
How many copper coins the NPC will drop when killed (100 copper coins = 1 silver coin etc....
Definition NPC.cs:1156
int alpha
0 is opaque, and 255 is transparent. Note that this is the opposite of how alpha is typically express...
Definition NPC.cs:1092

Referenced by Terraria.NPC.AI_065_Butterflies(), Terraria.NPC.AI_120_HallowBoss(), Terraria.NPC.SetDefaults(), and Terraria.NPC.VanillaAI_Inner().