public Game1() : base() { #region GRAPHICS AND CONTENT graphics = new GraphicsDeviceManager(this); this.graphics.PreferredBackBufferHeight = 544; this.graphics.PreferredBackBufferWidth = 960; graphics.ApplyChanges(); this.Window.Title = "Test Game"; Globals.m_windowHeight = graphics.PreferredBackBufferHeight; Globals.m_windowWidth = graphics.PreferredBackBufferWidth; Content.RootDirectory = "Content"; #endregion Globals.m_rng = new Random(); this.IsMouseVisible = false; m_options = new OptionsObject(); Globals.m_mousePosition = new Vector2(0, 0); Globals.m_gameWidth = 1260; Globals.m_gameHeight = 1260; Globals.m_backgroundRectangle = new Rectangle(0, 0, 960, 544); Globals.m_backgroundRectangle2 = new Rectangle(-960, 0, 960, 544); m_options.LoadOptions(); //Globals.m_fullscreen = m_options.m_fullscreen; Globals.m_volume = m_options.m_volume; }
public HelpState() : base() { m_backgroundSprite = content.Load<Texture2D>("Images/MenuBackground"); m_titleTexture = content.Load<Texture2D>("Images/HelpAndOptionsTitle"); m_buttonTexture = content.Load<Texture2D>("Images/arrows"); m_playerTexture = content.Load<Texture2D>("Images/playerNoGlow"); m_playerGlowTexture = content.Load<Texture2D>("Images/playerGlow"); m_indicator = content.Load<Texture2D>("Images/topLeftSelector"); m_playerColourButtonTexture = content.Load<Texture2D>("Images/PlayerColourText"); m_instructionsButtonTexture = content.Load<Texture2D>("Images/InstructionsText"); m_volumeButtonTexture = content.Load<Texture2D>("Images/VolumeText"); m_controlsButtonTexture = content.Load<Texture2D>("Images/ControlsText"); m_enemiesButtonTexture = content.Load<Texture2D>("Images/EnemiesText"); //m_fullscreenButtonTexture = content.Load<Texture2D>("Images/FullscreenText"); m_powerupsButtonTexture = content.Load<Texture2D>("Images/PowerupsText"); m_backButtonTexture = content.Load<Texture2D>("Images/BackText"); m_enemiesInformation = content.Load<Texture2D>("Images/Enemies"); m_pcControls = content.Load<Texture2D>("Images/PCControls"); m_vitaControls = content.Load<Texture2D>("Images/VitaControls"); m_gamePadControls = content.Load<Texture2D>("Images/GamePadControls"); m_powerupInformation = content.Load<Texture2D>("Images/PowerupsInformation"); m_instructionsInformation = content.Load<Texture2D>("Images/Instructions"); m_blipSound = content.Load<SoundEffect>("Sounds/Blip"); m_options = new OptionsObject(); m_options.LoadOptions(); m_buttonSelected = 0; m_red = m_options.m_red; m_green = m_options.m_green; m_blue = m_options.m_blue; m_volume = m_options.m_volume; //m_fullscreen = m_options.m_fullscreen; m_imageJustOverlayed = false; m_showInstructions = false; m_showGamePadControls = false; m_showKeyboardControls = false; m_showVitaControls = false; m_showEnemies = false; m_showPowerups = false; m_text = Color.White; m_redUpButton = new Button(370, 190, 16, 16, m_buttonTexture); m_redDownButton = new Button(370, 280, 16, 16, m_buttonTexture); m_greenUpButton = new Button(410, 190, 16, 16, m_buttonTexture); m_greenDownButton = new Button(410, 280, 16, 16, m_buttonTexture); m_blueUpButton = new Button(450, 190, 16, 16, m_buttonTexture); m_blueDownButton = new Button(450, 280, 16, 16, m_buttonTexture); m_volumeUpButton = new Button(410, 335, 16, 16, m_buttonTexture); m_volumeDownButton = new Button(410, 405, 16, 16, m_buttonTexture); // m_fullscreenButton = new Button(420, 415, 16, 16, m_buttonTexture); m_instructionsButton = new Button(680, 175, 224, 40, m_instructionsButtonTexture); m_enemiesButton = new Button(675, 330, 155, 40, m_enemiesButtonTexture); m_powerupsButton = new Button(685, 415, 175, 40, m_powerupsButtonTexture); m_backButton = new Button(478, 498, 100, 40, m_backButtonTexture); m_controlsButton = new Button(680, 250, 155, 40, m_controlsButtonTexture); m_indicatorLeft.X = m_redUpButton.m_texturePosition.X - m_redUpButton.m_rectangle.Width / 2; m_indicatorLeft.Y = m_redUpButton.m_texturePosition.Y - 8; m_indicatorRight.X = m_redUpButton.m_texturePosition.X + m_redUpButton.m_rectangle.Width / 2; m_indicatorRight.Y = m_redUpButton.m_texturePosition.Y + 8; }