///Debug info drawing public static void DEBUG_DrawDebugInfo(SpriteBatch batch, SpriteFont debugFont, GameObject entity, Map map) { batch.DrawString(debugFont, "Speed: " + entity.xVel, new Vector2(10, 10), Color.Purple, 0, Vector2.Zero, 0.8f, SpriteEffects.None, 0); batch.DrawString(debugFont, "MapTiles: \n" + map.name, new Vector2(10, 30), Color.Red, 0, Vector2.Zero, 1, SpriteEffects.None, 0); batch.DrawString(debugFont, "MapWidth " + map.Width, new Vector2(10, 10), Color.Purple, 0, Vector2.Zero, 0.8f, SpriteEffects.None, 0); //batch.DrawString(debugFont, "Tileset: " + map.tiles[0].Index.X, new Vector2(10, 30), Color.Red, 0, Vector2.Zero, 0.8f, SpriteEffects.None, 0); //batch.Draw(map.sprite.Texture, new Vector2(20, 40), Color.White); }
public static void Draw(SpriteBatch batch, GameObject obj) { batch.Draw(obj.sprite.Texture, new Vector2(obj.posX, obj.posY), Color.White); }