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

◆ DrawInterface_Healthbar_Worm()

void Terraria.Main.DrawInterface_Healthbar_Worm ( NPC head,
int tailID,
float scale )
inlineprivate

Definition at line 59560 of file Main.cs.

59561 {
59562 //IL_0041: Unknown result type (might be due to invalid IL or missing references)
59563 //IL_0047: Unknown result type (might be due to invalid IL or missing references)
59564 //IL_004c: Unknown result type (might be due to invalid IL or missing references)
59565 //IL_0056: Unknown result type (might be due to invalid IL or missing references)
59566 //IL_005b: Unknown result type (might be due to invalid IL or missing references)
59567 //IL_005d: Unknown result type (might be due to invalid IL or missing references)
59568 //IL_006d: Unknown result type (might be due to invalid IL or missing references)
59569 NPC nPC = head;
59570 for (int i = head.whoAmI + 1; i < 200; i++)
59571 {
59572 if (npc[i].active && npc[i].type == tailID)
59573 {
59574 nPC = npc[i];
59575 break;
59576 }
59577 }
59578 Vector2 vector = (head.position + nPC.position) / 2f;
59579 DrawHealthBar(vector.X + (float)(head.width / 2), vector.Y + (float)(head.height / 2), head.life, head.lifeMax, Lighting.Brightness((int)((head.position.X + (float)(head.width / 2)) / 16f), (int)((head.position.Y + (float)(head.height / 2) + head.gfxOffY) / 16f)), scale);
59580 }
void DrawHealthBar(float X, float Y, int Health, int MaxHealth, float alpha, float scale=1f, bool noFlip=false)
Draws a small health bar. F:Terraria.Main.spriteBatch should already be started before calling this...
Definition Main.cs:21442
static NPC[] npc
Definition Main.cs:1830

References Terraria.Lighting.Brightness(), Terraria.Main.DrawHealthBar(), Terraria.NPC.gfxOffY, Terraria.Entity.height, Terraria.NPC.life, Terraria.NPC.lifeMax, Terraria.Main.npc, Terraria.Entity.position, Terraria.Entity.whoAmI, and Terraria.Entity.width.

Referenced by Terraria.Main.DrawInterface_14_EntityHealthBars().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: