/*load all this things*/ public Font(FramedSprite pSprite, Dictionary <int, int> pMapping, int pHorizontalSpace, int pVerticalSpace, Color pFontColor) { sprite = pSprite; sprite.SetCurrentFrame(0); sprite.SetTint(pFontColor); mapping = pMapping; spacing = new Size { Width = pHorizontalSpace, Height = pVerticalSpace }; }
public override void LoadContent(ContentManager pContentManager) { base.LoadContent(pContentManager); backgroundTexture = pContentManager.GetTexture("Content/islend_sky.jpg"); backgroundSprite = new Sprite(backgroundTexture, new Vector2(0, 0), Color.White, false); sonicTexture = pContentManager.GetTexture("Content/sonic.jpg"); sonicSprite = new Sprite(sonicTexture, new Vector2(0, 300), Color.White, true); Texture2D fontSpriteTexture = pContentManager.GetTexture("Content/Fonts/small-font.png"); FramedSprite fontSprite = new FramedSprite(8, 6, 0, fontSpriteTexture, Vector2.Zero, Color.Black, false); var mapping = pContentManager.GetFontMapping("Content/Fonts/small-font.fontmapping"); smallFont = new Font(fontSprite, mapping, 0, 1, Color.Red); }