Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
 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);
 }