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

◆ DrawHealthBar()

virtual ? bool Terraria.ModLoader.GlobalNPC.DrawHealthBar ( NPC npc,
byte hbPosition,
ref float scale,
ref Vector2 position )
inlinevirtualinherited

Allows you to control how the health bar for the given 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
npc
hbPosition
scale
position
Returns

Definition at line 550 of file GlobalNPC.cs.

551 {
552 return null;
553 }