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

◆ NpcToBossBar()

static bool Terraria.ModLoader.BossBarLoader.NpcToBossBar ( NPC npc,
out ModBossBar value )
inlinestatic

Gets the ModBossBar associated with this NPC.

Parameters
npcThe NPC
valueWhen this method returns, contains the ModBossBar associated with the specified NPC
Returns
true if a ModBossBar is assigned to it; otherwise, false.

Definition at line 157 of file BossBarLoader.cs.

158 {
159 value = null;
160 if (npc.BossBar is ModBossBar bossBar)
161 {
162 value = bossBar;
163 }
164 return value != null;
165 }

References Terraria.NPC.BossBar.

Referenced by Terraria.ModLoader.BossBarLoader.PostDraw(), and Terraria.ModLoader.BossBarLoader.PreDraw().

+ Here is the caller graph for this function: