Exemplo 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()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            button      = Content.Load <Texture2D>("Button");
            btnPlay     = new cButton(Content.Load <Texture2D>("risklogo"), graphics.GraphicsDevice);
            btnPlay.setPosition(new Vector2(350, 300));
            add       = new Button(GraphicsDevice, Content.Load <Texture2D>("mais"), new Vector2(1100, 300));
            sub       = new Button(GraphicsDevice, Content.Load <Texture2D>("menos"), new Vector2(1100, 350));
            confirmar = new Button(GraphicsDevice, Content.Load <Texture2D>("confirmar"), new Vector2(-100, -100));
            proximo   = new Button(GraphicsDevice, Content.Load <Texture2D>("proximo"), new Vector2(-100, -100));

            gametxt     = Content.Load <SpriteFont>("GameText");
            button_text = Content.Load <SpriteFont>("Numeros_Mapa");
            tabuleiro   = new Tabuleiro(GraphicsDevice, button);
            mainMenu    = Content.Load <Texture2D>("800x600");
            mainMenuRec = new Rectangle((int)((width / 2) - (mainMenu.Width / 2)), (int)((height / 2) - (mainMenu.Height / 2)), 800, 600);
            // TODO: use this.Content to load your game content here
        }
Exemplo n.º 2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            button = Content.Load<Texture2D>("Button");
            btnPlay = new cButton(Content.Load<Texture2D>("risklogo"), graphics.GraphicsDevice);
            btnPlay.setPosition(new Vector2(350, 300));
            add = new Button(GraphicsDevice,Content.Load<Texture2D>("mais"),new Vector2(1100,300));
            sub = new Button(GraphicsDevice,Content.Load<Texture2D>("menos"),new Vector2(1100,350));
            confirmar = new Button(GraphicsDevice,Content.Load<Texture2D>("confirmar"),new Vector2(-100,-100));
            proximo = new Button(GraphicsDevice,Content.Load<Texture2D>("proximo"),new Vector2(-100,-100));

            gametxt = Content.Load<SpriteFont>("GameText");
            button_text = Content.Load<SpriteFont>("Numeros_Mapa");
            tabuleiro = new Tabuleiro(GraphicsDevice,button);
            mainMenu = Content.Load<Texture2D>("800x600");
            mainMenuRec = new Rectangle((int)((width / 2) - (mainMenu.Width / 2)), (int)((height / 2) - (mainMenu.Height / 2)), 800, 600);
            // TODO: use this.Content to load your game content here
        }