Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        override protected void LoadContent()
        {
            tileMap.AddTileTexture(Game.Content.Load <Texture2D>("Plain Block"));
            tileMap.AddTileTexture(Game.Content.Load <Texture2D>("Dirt Block"));
            tileMap.AddTileTexture(Game.Content.Load <Texture2D>("Stone Block"));
            tileMap.AddTileTexture(Game.Content.Load <Texture2D>("Water Block"));

            tileMap.AddDecalTexture(Game.Content.Load <Texture2D>("Tree Tall"));
            tileMap.AddDecalTexture(Game.Content.Load <Texture2D>("Rock"));

            tileMap.HighlightTexture = Game.Content.Load <Texture2D>("Selector");
            tileMap.MoveIndicator    = Game.Content.Load <Texture2D>("Highlight");
            tileMap.AttackIndicator  = Game.Content.Load <Texture2D>("Attack Highlight");

            entityFactory.LoadContent(Game.Content);

            //Initializing Entity Positions.  This should probably move.
            List <Entity> initialEntities = entityFactory.InitializeJiemyuAlpha1Layout();

            //Initializing Teams
            List <Team> initialTeams = entityFactory.InitializeJiemyuAlpha1Teams();

            foreach (Entity e in initialEntities)
            {
                tileMap.AddObject(e, tileMap.GetTileForPoint(e.Position));

                //If it's on the top half of the map, add to top team.  Otherwise bottom team.
                if (e.Position.Y < 684)
                {
                    TurnManager.Instance.Add(e, initialTeams[0]);
                }
                else
                {
                    TurnManager.Instance.Add(e, initialTeams[1]);
                }
            }

            spriteBatch = new SpriteBatch(GraphicsDevice);

            base.LoadContent();
        }