/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { this.IsMouseVisible = true; graphics.DeviceResetting += new EventHandler(GraphicsDevice_DeviceResetting); CityDataRetriever cityData = new CityDataRetriever(); m_Terrain = new Terrain(GraphicsDevice, CITY_NUMBER, cityData, Content); m_Terrain.Initialize(); m_Terrain.RegenData = true; //Shadow configuration. Very Low quality res: 512, Low quality: 1024, High quality: 2048 m_Terrain.ShadowsEnabled = true; m_Terrain.ShadowRes = 2048; base.Initialize(); }
public Terrain(GraphicsDevice GfxDevice, int CityNumber, CityDataRetriever cityData, ContentManager Content) { m_CityData = cityData; m_GraphicsDevice = GfxDevice; m_CityNumber = CityNumber; //LoadContent(GfxDevice, Content); }