public DiagnosticsScene(GraphicsDevice graphicsDevice, ContentManager content) { fpsMonitor = new FpsMonitor(); this.graphicsDevice = graphicsDevice; font = content.Load <SpriteFont>(@"Fonts/diagnosticsFont"); this.background = content.Load <Texture2D>(@"Textures/whiteRectangle"); texts = new Dictionary <Vector2, string>(); LargestWidth = 0; LargestHeight = 0; SelectedTexture = null; bgTransparency = new Animations.SmoothTransition(0.5f, 0.002f, 0.0f, 0.5f); fontTransparency = new Animations.SmoothTransition(1.0f, 0.004f, 0.0f, 1.0f); Level.Editor.TileManager.ShowPassable = true; isActive = true; }
public MenuHandler(ContentManager Content, GraphicsDevice graphicsDevice, MapHandlerScene mapHandler, Level.TileMap tileMap, SceneDirector sceneDirector) { this.graphicsDevice = graphicsDevice; menuWindows = new Dictionary <string, IScene>(); menuWindows.Add("mainMenu", new MainMenu(Content, this, sceneDirector)); menuWindows.Add("newMap", new NewMapMenu(Content, this, tileMap)); menuWindows.Add("loadMap", new LoadMapMenu(graphicsDevice, Content, this, mapHandler, tileMap)); menuWindows.Add("saveMap", new SaveMapMenu(Content, this, mapHandler)); activeWindow = menuWindows["mainMenu"]; IsActive = false; currentState = new MenuStateEnum(); currentState = MenuStateEnum.Hidden; transition = new Animations.SmoothTransition(0.0f, 0.011f, 0.0f, 1.0f); this.camera = new Camera.Camera(Vector2.Zero, new Vector2(Resolution.ResolutionHandler.WindowWidth, Resolution.ResolutionHandler.WindowHeight), new Vector2(Resolution.ResolutionHandler.WindowWidth, Resolution.ResolutionHandler.WindowHeight)); camera.Zoom = transition.Value; Resolution.ResolutionHandler.Changed += ResetSizes; }