Ejemplo n.º 1
0
 public static void DrawRect(this SpriteBatch spriteBatch, Texture2D texture, NonAxisAlignedBoundingBox rect, int thickness, Color color)
 {
     spriteBatch.DrawLine(texture, rect.TopLeft, rect.TopRight, thickness, color);
     spriteBatch.DrawLine(texture, rect.TopLeft, rect.BotLeft, thickness, color);
     spriteBatch.DrawLine(texture, rect.TopRight, rect.BotRight, thickness, color);
     spriteBatch.DrawLine(texture, rect.BotLeft, rect.BotRight, thickness, color);
 }
Ejemplo n.º 2
0
 private void DrawBoundingBox(SpriteBatch spriteBatch, Camera camera, Color color, NonAxisAlignedBoundingBox box)
 {
     var blank = StateMachine.Owner.RenderManager.TextureCache.GetResource("blank");
     spriteBatch.DrawRect(blank, box, 5, color);
 }