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

◆ PreDraw()

virtual bool Terraria.ModLoader.GlobalNPC.PreDraw ( NPC npc,
SpriteBatch spriteBatch,
Vector2 screenPos,
Color drawColor )
inlinevirtualinherited

Allows you to draw things behind an NPC, or to modify the way the NPC is drawn. Substract screenPos from the draw position before drawing. Return false to stop the game from drawing the NPC (useful if you're manually drawing the NPC). Returns true by default.

Parameters
npcThe NPC that is being drawn
spriteBatchThe spritebatch to draw on
screenPosThe screen position used to translate world position into screen position
drawColorThe color the NPC is drawn in
Returns

Definition at line 517 of file GlobalNPC.cs.

518 {
519 return true;
520 }