Ejemplo n.º 1
0
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Load textures into ContentHelper
            ContentHelper.AddTexture("tileBlue_27", Content.Load <Texture2D>("Graphics\\tileBlue_27"));
            ContentHelper.AddTexture("tileBlue_31", Content.Load <Texture2D>("Graphics\\tileBlue_31"));
            ContentHelper.AddTexture("tileGreen_27", Content.Load <Texture2D>("Graphics\\tileGreen_27"));
            ContentHelper.AddTexture("tileGreen_35", Content.Load <Texture2D>("Graphics\\tileGreen_35"));
            ContentHelper.AddTexture("tilePink_27", Content.Load <Texture2D>("Graphics\\tilePink_27"));
            ContentHelper.AddTexture("tilePink_30", Content.Load <Texture2D>("Graphics\\tilePink_30"));
            ContentHelper.AddTexture("tileRed_27", Content.Load <Texture2D>("Graphics\\tileRed_27"));
            ContentHelper.AddTexture("tileRed_36", Content.Load <Texture2D>("Graphics\\tileRed_36"));
            ContentHelper.AddTexture("tileYellow_27", Content.Load <Texture2D>("Graphics\\tileYellow_27"));
            ContentHelper.AddTexture("tileYellow_33", Content.Load <Texture2D>("Graphics\\tileYellow_33"));
        }
Ejemplo 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);

            // Add tile textures
            ContentHelper.AddTexture("tileBlue_27", Content.Load <Texture2D>("Graphics\\tileBlue_27"));
            ContentHelper.AddTexture("tileGreen_27", Content.Load <Texture2D>("Graphics\\tileGreen_27"));
            ContentHelper.AddTexture("tilePink_27", Content.Load <Texture2D>("Graphics\\tilePink_27"));
            ContentHelper.AddTexture("tileRed_27", Content.Load <Texture2D>("Graphics\\tileRed_27"));
            ContentHelper.AddTexture("tileYellow_27", Content.Load <Texture2D>("Graphics\\tileYellow_27"));

            // Add symbol textures
            ContentHelper.AddTexture("tileBlue_31", Content.Load <Texture2D>("Graphics\\tileBlue_31"));
            ContentHelper.AddTexture("tileGreen_35", Content.Load <Texture2D>("Graphics\\tileGreen_35"));
            ContentHelper.AddTexture("tilePink_30", Content.Load <Texture2D>("Graphics\\tilePink_30"));
            ContentHelper.AddTexture("tileRed_36", Content.Load <Texture2D>("Graphics\\tileRed_36"));
            ContentHelper.AddTexture("tileYellow_33", Content.Load <Texture2D>("Graphics\\tileYellow_33"));

            // Add player texture
            ContentHelper.AddTexture("player", Content.Load <Texture2D>("Graphics\\player"));

            // Add background textures for the GameBoard
            ContentHelper.AddTexture("gameBoardBackground", Content.Load <Texture2D>("Background\\gameBoardBackground"));
            ContentHelper.AddTexture("gameBoardOverlayCheat", Content.Load <Texture2D>("Background\\gameBoardOverlayCheat"));

            // Add UI textures
            ContentHelper.AddTexture("grey_panel", Content.Load <Texture2D>("UI\\grey_panel"));
            ContentHelper.AddTexture("score_panel", Content.Load <Texture2D>("UI\\score_panel"));
            ContentHelper.AddTexture("yellow_button04", Content.Load <Texture2D>("UI\\yellow_button04"));
            ContentHelper.AddTexture("yellow_button05", Content.Load <Texture2D>("UI\\yellow_button05"));

            // Add font for score
            ContentHelper.AddFont("KenVectorFutureThin", Content.Load <SpriteFont>("Fonts\\KenVectorFutureThin"));
            ContentHelper.AddFont("KenneySpace", Content.Load <SpriteFont>("Fonts\\KenneySpace"));

            // Once all the assets are loaded into the ContentHelper, create the gameboard
            scenes = new Stack <IScene>();
            AddScene(new GameBoard(this));
            // scenes.Push(new GameBoard(this));
            // gameBoard = new GameBoard();
        }