/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // Create map from tournament map = new Map(Program.Tournament.Map); map.LoadGraphicsContent(Content); // Load hud hud = new Hud(); hud.LoadContent(Content, GraphicsDevice); // Initialize ScoreKeeper scoreKeeper = new Scorekeeper(); // Initialize ViewSelectionMenu viewSelectionMenu = new ViewSelectionMenu(); viewSelectionMenu.LoadContent(Content, GraphicsDevice); // Load light textures texturePixel = Content.Load <Texture2D>("pixel"); textureLight = Content.Load <Texture2D>("light"); lightRenderTarget = new RenderTarget2D(GraphicsDevice, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight, false, graphics.GraphicsDevice.PresentationParameters.BackBufferFormat, graphics.GraphicsDevice.PresentationParameters.DepthStencilFormat); // Set up first round InitializeRound(); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); InitializeCamera(); // Select Theme SelectTheme(); // Create map from tournament map = new Map(Program.Tournament.Map); map.LoadGraphicsContent(GraphicsDevice, Content, theme); map.ProjectionMatrix = projection; map.WorldMatrix = Matrix.Identity; // Laod sky sky = new Sky(); sky.Load(Content, theme); // Laod hud hud = new Hud(); hud.LoadContent(Content, GraphicsDevice); // Initialize ScoreKeeper scoreKeeper = new Scorekeeper(); // Initialize MenuManager viewSelectionMenu = new ViewSelectionMenu(); viewSelectionMenu.LoadContent(Content, GraphicsDevice); // Set up first round InitializeRound(); }