public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; IsMouseVisible = true; //full screen. graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height; graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width; //windowed screen. //graphics.PreferredBackBufferHeight = 1000; //graphics.PreferredBackBufferWidth = 1600; screen_height = graphics.PreferredBackBufferHeight; screen_width = graphics.PreferredBackBufferWidth; FontScale = Game1.screen_height * 0.00055f; // for scaling our fonts to different screens. inputHandler = new InputHandler(this); Components.Add(inputHandler); celAnimationManager = new CelAnimationManager(this, "Textures\\Animations"); Components.Add(celAnimationManager); soundManager = new SoundManager(this); Components.Add(soundManager); stateManager = new GameStateManager(this); Components.Add(stateManager); TitleIntroState = new TitleIntroState(this); StartMenuState = new StartMenuState(this); ChooseFlagState = new ChooseFlagState(this); PausedState = new PausedState(this); OptionsMenuState = new OptionsMenuState(this); BuildingBoardState = new BuildingBoardState(this); PlacingSoldiersState = new PlacingSoldiersState(this); PlayingState = new PlayingState(this); EnableSoundFx = true; EnableMusic = true; }
public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; this.IsMouseVisible = true; graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height; graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width; screen_height = graphics.PreferredBackBufferHeight; screen_width = graphics.PreferredBackBufferWidth; inputHandler = new InputHandler(this); Components.Add(inputHandler); celAnimationManager = new CelAnimationManager(this, "Textures\\Animations"); Components.Add(celAnimationManager); soundManager = new SoundManager(this); Components.Add(soundManager); stateManager = new GameStateManager(this); Components.Add(stateManager); TitleIntroState = new TitleIntroState(this); StartMenuState = new StartMenuState(this); PausedState = new PausedState(this); OptionsMenuState = new OptionsMenuState(this); BuildingBoardState = new BuildingBoardState(this); PlacingSoldiersState = new PlacingSoldiersState(this); PlayingState = new PlayingState(this); EnableSoundFx = true; EnableMusic = true; }