Beispiel #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);

            //textura sem nada
            Utils.BlankTexture = new Texture2D(this.GraphicsDevice, 1, 1);
            Utils.BlankTexture.SetData <Color>(new Color[] { Color.White });

            //setando content manager do AssetLoader
            AssetLoader.Game = this;

            ServiceContainer     = new StrategyGameLibrary.ServiceContainer();
            ContentBuilder       = new StrategyGameLibrary.ContentBuilder();
            CustomContentManager = new ContentManager(ServiceContainer, ContentBuilder.OutputDirectory);


            #region clean
            //
            //Tile.TileSetTexture = Content.Load<Texture2D>(@"CityMap\testeTileSet3");

            //teste
            //mapa = Content.Load<Texture2D>(@"CityMap\grade");
            //blankTexture = new Texture2D(GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
            //Color[,] arrayCor = new Color[50,50];
            //for (int i = 0; i < 50; i++)
            //    for (int y = 0; y > 50; y++)
            //    arrayCor[i,y] = Color.LightGray;
            //
            //blankTexture.SetData(arrayCor);

            //+teste
            //selectionTexture = new Texture2D(this.GraphicsDevice, 1, 1);
            //selectionTexture.SetData<Color>(new Color[] { Color.White });
            #endregion
            base.LoadContent();
        }
        /// <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);

            //textura sem nada
            Utils.BlankTexture = new Texture2D(this.GraphicsDevice, 1, 1);
            Utils.BlankTexture.SetData<Color>(new Color[] { Color.White });

            //setando content manager do AssetLoader
            AssetLoader.Game = this;

            ServiceContainer = new StrategyGameLibrary.ServiceContainer();
            ContentBuilder = new StrategyGameLibrary.ContentBuilder();
            CustomContentManager = new ContentManager(ServiceContainer, ContentBuilder.OutputDirectory);

            #region clean
            //
            //Tile.TileSetTexture = Content.Load<Texture2D>(@"CityMap\testeTileSet3");

            //teste
            //mapa = Content.Load<Texture2D>(@"CityMap\grade");
            //blankTexture = new Texture2D(GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
            //Color[,] arrayCor = new Color[50,50];
            //for (int i = 0; i < 50; i++)
            //    for (int y = 0; y > 50; y++)
            //    arrayCor[i,y] = Color.LightGray;
            //
            //blankTexture.SetData(arrayCor);

            //+teste
            //selectionTexture = new Texture2D(this.GraphicsDevice, 1, 1);
            //selectionTexture.SetData<Color>(new Color[] { Color.White });
            #endregion
            base.LoadContent();
        }