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

◆ DrawTownAttackSwing()

virtual void Terraria.ModLoader.ModNPC.DrawTownAttackSwing ( ref Texture2D item,
ref Rectangle itemFrame,
ref int itemSize,
ref float scale,
ref Vector2 offset )
inlinevirtual

Allows you to customize how this town NPC's weapon is drawn when this NPC is swinging it (this NPC must have an attack type of 3). item is the Texture2D instance of the item to be drawn, itemFrame is the section of the texture to draw, itemSize is the width and height of the item's hitbox (the same values for TownNPCAttackSwing), scale is the multiplier for the item's drawing size, and offset is the offset from which to draw the item from its normal position. The item texture can be any texture, but if it is an item texture you can use M:Terraria.Main.GetItemDrawFrame(System.Int32,Microsoft.Xna.Framework.Graphics.Texture2D@,Microsoft.Xna.Framework.Rectangle@) to set item and itemFrame easily.

Parameters
item
itemFrame
itemSize
scale
offset

Definition at line 852 of file ModNPC.cs.

853 {
854 }