|
TModLoader v1.4.4.9
TModLoader source code documentation
|
|
inline |
Draws a small health bar.
F:Terraria.Main.spriteBatch should already be started before calling this method.
| X | The x-coordinate of the health bar in world coordinates. |
| Y | The y-coordinate of the health bar in world coordinates. |
| Health | The current health displayed. The health bar is drawn Health / MaxHealth percent full. If Health <= 0, no health bar is drawn. If Health > MaxHealth , the health bar will not exceed max capacity. |
| MaxHealth | The maximum health displayed. The health bar is drawn Health / MaxHealth percent full. |
| alpha | The opacity of the healthbar, where 0f is transparent and 1f is opaque. |
| scale | The visual scale of the health bar. |
| noFlip | If true, then the health bar will not adjust its y-position for players with reversed gravity. |
Definition at line 21442 of file Main.cs.
References Terraria.Graphics.Light.Color, Terraria.GameContent.TextureAssets.Hb1, Terraria.GameContent.TextureAssets.Hb2, Terraria.Main.myPlayer, Terraria.Main.player, Terraria.Main.screenHeight, Terraria.Main.screenPosition, and Terraria.Main.spriteBatch.
Referenced by Terraria.Main.DrawInterface_14_EntityHealthBars(), and Terraria.Main.DrawInterface_Healthbar_Worm().
Here is the caller graph for this function: