/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { string[] menuItems = { "Start Game", "High Scores", "End Game" }; spriteBatch = new SpriteBatch(GraphicsDevice); menuComponent = new MenuComponent(this, spriteBatch, Content.Load<SpriteFont>("menufont"), menuItems); Components.Add(menuComponent); }
public StartScreen(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D image) : base(game, spriteBatch) { string[] menuItems = { "Start Game", "End Game" }; menuComponent = new MenuComponent(game, spriteBatch, spriteFont, menuItems); Components.Add(menuComponent); this.image = image; imageRectangle = new Rectangle( 0, 0, Game.Window.ClientBounds.Width, Game.Window.ClientBounds.Height); }