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

◆ Draw()

void Terraria.GameContent.Bestiary.UnlockableNPCEntryIcon.Draw ( BestiaryUICollectionInfo providedInfo,
SpriteBatch spriteBatch,
EntryIconDrawSettings settings )
inline

Implements Terraria.GameContent.Bestiary.IEntryIcon.

Definition at line 228 of file UnlockableNPCEntryIcon.cs.

229 {
230 //IL_0021: Unknown result type (might be due to invalid IL or missing references)
231 //IL_002f: Unknown result type (might be due to invalid IL or missing references)
232 //IL_003f: Unknown result type (might be due to invalid IL or missing references)
233 //IL_0049: Unknown result type (might be due to invalid IL or missing references)
234 //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
236 if (_customTexture != null)
237 {
238 spriteBatch.Draw(_customTexture.Value, _npcCache.Center, (Rectangle?)null, Color.White, 0f, _customTexture.Size() / 2f, _npcCache.scale, (SpriteEffects)0, 0f);
239 return;
240 }
241 if (_npcCache.townNPC && TownNPCProfiles.Instance.GetProfile(_npcCache, out var profile))
242 {
243 TextureAssets.Npc[_npcCache.type] = profile.GetTextureNPCShouldUse(_npcCache);
244 }
245 Main.instance.DrawNPCDirect(spriteBatch, _npcCache, _npcCache.behindTiles, Vector2.Zero);
246 }
Vector2 Center
Definition Entity.cs:70
float scale
Makes the NPC bigger or smaller. Bigger than 1f is bigger. Defaults to 1f.
Definition NPC.cs:1104
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
bool behindTiles
Indicates that this NPC draws behind solid tiles. See ExampleDrawBehindNPCfor examples of how to us...
Definition NPC.cs:1149
bool townNPC
Definition NPC.cs:1174

References Terraria.GameContent.Bestiary.UnlockableNPCEntryIcon._customTexture, Terraria.GameContent.Bestiary.UnlockableNPCEntryIcon._npcCache, Terraria.NPC.behindTiles, Terraria.Entity.Center, Terraria.GameContent.TownNPCProfiles.Instance, Terraria.Main.instance, Terraria.GameContent.TextureAssets.Npc, Terraria.NPC.scale, Terraria.NPC.townNPC, Terraria.NPC.type, and Terraria.GameContent.Bestiary.UnlockableNPCEntryIcon.UpdatePosition().

+ Here is the call graph for this function: