tModLoader v2024.11
A mod to make and play Terraria mods
|
Static Public Member Functions | |
static void | DrawFancyBar_TML (SpriteBatch spriteBatch, BossBarDrawParams drawParams) |
Draws a healthbar with fixed barTexture dimensions (516x348) where the effective bar top left starts at 32x24, and is 456x22 big More... | |
static Asset< Texture2D > | GetTexture (ModBossBar bossBar) |
Returns the texture that the given bar is using. If it does not have a custom one, it returns the vanilla texture More... | |
static bool | NpcToBossBar (NPC npc, out ModBossBar value) |
Gets the ModBossBar associated with this NPC More... | |
static void | PostDraw (SpriteBatch spriteBatch, BigProgressBarInfo info, BossBarDrawParams drawParams) |
static bool | PreDraw (SpriteBatch spriteBatch, BigProgressBarInfo info, ref BossBarDrawParams drawParams) |
Properties | |
static ModBossBarStyle | CurrentStyle = vanillaStyle [get] |
static Asset< Texture2D > | VanillaBossBarTexture [get] |
|
static |
Draws a healthbar with fixed barTexture dimensions (516x348) where the effective bar top left starts at 32x24, and is 456x22 big
The icon top left starts at 4x20, and is 26x28 big
Frame 0 contains the frame (outline)
Frame 1 contains the 2 pixel wide strip for the tip of the bar itself
Frame 2 contains the 2 pixel wide strip for the bar itself, stretches out
Frame 3 contains the background
Frame 4 contains the 2 pixel wide strip for the tip of the bar itself (optional shield)
Frame 5 contains the 2 pixel wide strip for the bar itself, stretches out (optional shield)
Supply your own textures if you need a different shape/color, otherwise you can make your own method to draw it
spriteBatch | The spriteBatch that is drawn on |
drawParams | The draw parameters for the boss bar |
|
static |
Returns the texture that the given bar is using. If it does not have a custom one, it returns the vanilla texture
bossBar | The ModBossBar |
|
static |
Gets the ModBossBar associated with this NPC
npc | The NPC |
value | When this method returns, contains the ModBossBar associated with the specified NPC |
true
if a ModBossBar is assigned to it; otherwise, false
.