private void InitializeMap(int cityMap) { CityRenderer = new Terrain(GameFacade.GraphicsDevice); //The Terrain class implements the ThreeDAbstract interface so that it can be treated as a scene but manage its own drawing and updates. CityRenderer.m_GraphicsDevice = GameFacade.GraphicsDevice; CityRenderer.Initialize(cityMap); CityRenderer.LoadContent(GameFacade.GraphicsDevice); CityRenderer.RegenData = true; CityRenderer.SetTimeOfDay(0.5); GameFacade.Scenes.Add(CityRenderer); CityTooltip = new UICustomTooltip(); Add(CityTooltip); CityTooltipHitArea = new UICustomTooltipContainer(CityTooltip); CityTooltipHitArea.SetSize(ScreenWidth, ScreenHeight); AddAt(0, CityTooltipHitArea); }
public override void GameResized() { base.GameResized(); CityRenderer.Camera.ProjectionDirty(); Title.SetTitle(Title.Label.Caption); ucp.Y = ScreenHeight - 210; gizmo.X = ScreenWidth - 430; gizmo.Y = ScreenHeight - 230; MessageTray.X = ScreenWidth - 70; World?.GameResized(); var oldPanel = ucp.CurrentPanel; ucp.SetPanel(-1); ucp.SetPanel(oldPanel); CityTooltipHitArea.SetSize(ScreenWidth, ScreenHeight); }