Пример #1
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            font = Content.Load <SpriteFont>("SpriteFonts/font");   // Loads in font

            _texture  = Content.Load <Texture2D>("Sprites/Player"); // Loads in texture
            _position = new Vector2(768, 384);                      // Sets position

            background         = Content.Load <Texture2D>("Sprites/characterselect");
            gameBackground     = Content.Load <Texture2D>("Sprites/space_background");
            spriteContinueBttn = Content.Load <Texture2D>("Sprites/ContinueBttn");
            spriteRegBttn      = Content.Load <Texture2D>("Sprites/RegBttn");
            spriteLoginBttn    = Content.Load <Texture2D>("Sprites/LoginBttn");
            spritePlayBttn     = Content.Load <Texture2D>("Sprites/PlayBttn");

            mainMenu  = new MainMenu(spritePlayBttn, spriteRegBttn, spriteLoginBttn);
            pauseMenu = new DisplayMenu(spriteContinueBttn);
        }
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            font = Content.Load<SpriteFont>("SpriteFonts/font");    // Loads in font

            _texture = Content.Load<Texture2D>("Sprites/Player");   // Loads in texture
            _position = new Vector2(768, 384);  // Sets position

            background = Content.Load<Texture2D>("Sprites/characterselect");
            gameBackground = Content.Load<Texture2D>("Sprites/space_background");
            spriteContinueBttn = Content.Load<Texture2D>("Sprites/ContinueBttn");
            spriteRegBttn = Content.Load<Texture2D>("Sprites/RegBttn");
            spriteLoginBttn = Content.Load<Texture2D>("Sprites/LoginBttn");
            spritePlayBttn = Content.Load<Texture2D>("Sprites/PlayBttn");

            mainMenu = new MainMenu(spritePlayBttn, spriteRegBttn, spriteLoginBttn);
            pauseMenu = new DisplayMenu(spriteContinueBttn);
        }