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

◆ DrawHealthBar()

virtual ? bool Terraria.ModLoader.ModNPC.DrawHealthBar ( byte hbPosition,
ref float scale,
ref Vector2 position )
inlinevirtual

Allows you to control how the health bar for this NPC is drawn. The hbPosition parameter is the same as Main.hbPosition; it determines whether the health bar gets drawn above or below the NPC by default. The scale parameter is the health bar's size. By default, it will be the normal 1f; most bosses set this to 1.5f. Return null to let the normal vanilla health-bar-drawing code to run. Return false to stop the health bar from being drawn. Return true to draw the health bar in the position specified by the position parameter (note that this is the world position, not screen position).

Parameters
hbPosition
scale
position
Returns

Definition at line 634 of file ModNPC.cs.

635 {
636 return null;
637 }