/// <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. TileTexture[(int)Listof_Texture.Grass] = Content.Load <Texture2D>("Grass"); TileTexture[(int)Listof_Texture.CityCenter] = Content.Load <Texture2D>("Tile"); TileTexture[(int)Listof_Texture.Panel1] = Content.Load <Texture2D>("Panel1"); TileTexture[(int)Listof_Texture.Button1] = Content.Load <Texture2D>("Button1"); TileTexture[(int)Listof_Texture.Road] = Content.Load <Texture2D>("Road1"); TileTexture[(int)Listof_Texture.Residential] = Content.Load <Texture2D>("Residential"); TileTexture[(int)Listof_Texture.Commercial] = Content.Load <Texture2D>("Commercial"); TileTexture[(int)Listof_Texture.Industrial] = Content.Load <Texture2D>("Industrial"); TileTexture[(int)Listof_Texture.Residential_Structure] = Content.Load <Texture2D>("Residential_1"); TileTexture[(int)Listof_Texture.Commercial_Structure] = Content.Load <Texture2D>("Commercial_1"); TileTexture[(int)Listof_Texture.Industrial_Structure] = Content.Load <Texture2D>("Industrial_1"); TileTexture[(int)Listof_Texture.Construction] = Content.Load <Texture2D>("Construction1"); TileTexture[(int)Listof_Texture.PowerPlant1] = Content.Load <Texture2D>("PowerPlant_2"); TileTexture[(int)Listof_Texture.School1] = Content.Load <Texture2D>("School_1"); TileTexture[(int)Listof_Texture.ButtonIcons] = Content.Load <Texture2D>("BuildingIcons"); model = Content.Load <Model>("CityCenter"); model2 = Content.Load <Model>("Tower1"); basicfont = Content.Load <SpriteFont>("romulus"); _interface = new Interface(Screen_Size); _e = new Encyclopedia(); _city = new City(new Point(200, 200), _e); _t = new Tech(); spriteBatch = new SpriteBatch(GraphicsDevice); for (int x = 0; x < Enum.GetNames(typeof(Listof_TechItems)).Length; x++) { UnlockedTech.Add((Listof_TechItems)x); } for (int x = 0; x < Enum.GetNames(typeof(Listof_BuildTabCategories)).Length; x++) { BuildTech.Add((Listof_BuildTabCategories)x, new HashSet <int>()); } // TODO: use this.Content to load your game content here }
public City(Point CitySize, Encyclopedia _e) { CityArea = new Rectangle(new Point(0, 0), CitySize); TileMap = new City_Tyle[CitySize.X, CitySize.Y]; districts = new HashSet <District>(); this._e = _e; for (int x = 0; x < CitySize.X; x++) { for (int y = 0; y < CitySize.Y; y++) { TileMap[x, y] = new City_Tyle(); } } }