using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; namespace Decimation.Content.Debug { public static class DebugUtils { public static void DrawDebugHitbox(this NPC npc, SpriteBatch spriteBatch) { Texture2D debugTexture = Decimation.Instance.GetTexture("Content/Debug/pixel"); spriteBatch.Draw( debugTexture, new Rectangle( (int) (npc.position.X - Main.screenPosition.X), (int) (npc.position.Y - Main.screenPosition.Y), (int) (npc.width * npc.scale), (int) (npc.height * npc.scale) ), new Color(255, 0, 0, 20) ); } } }