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

◆ SetFrameSize()

void Terraria.NPC.SetFrameSize ( )
inline

Definition at line 72139 of file NPC.cs.

72140 {
72141 //IL_004a: Unknown result type (might be due to invalid IL or missing references)
72142 //IL_004f: Unknown result type (might be due to invalid IL or missing references)
72143 Main.instance.LoadNPC(type);
72144 if (setFrameSize)
72145 {
72146 frame = new Rectangle(0, 0, TextureAssets.Npc[type].Width(), TextureAssets.Npc[type].Height() / Main.npcFrameCount[type]);
72147 setFrameSize = false;
72148 }
72149 }
static Asset< Texture2D >[] Npc
bool setFrameSize
Definition NPC.cs:584
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
Definition NPC.cs:990
Rectangle frame
Definition NPC.cs:1083

References Terraria.NPC.frame, Terraria.Main.instance, Terraria.GameContent.TextureAssets.Npc, Terraria.Main.npcFrameCount, Terraria.NPC.setFrameSize, and Terraria.NPC.type.

Referenced by Terraria.GameContent.Bestiary.UnlockableNPCEntryIcon.SimulateFirstHover().

+ Here is the caller graph for this function: