protected override void LoadContent() { device = graphics.GraphicsDevice; basicEffect = new BasicEffect(device, null); cCross = new CoordCross(device); myModel = Content.Load <Model>("Ship"); modelTransforms = new Matrix[myModel.Bones.Count]; Effect ppEffect = Content.Load <Effect>("postprocessing"); postProcessor = new PostProcessor(device, ppEffect); }
protected override void LoadContent() { device = graphics.GraphicsDevice; SpriteFont menuFont = Content.Load <SpriteFont>("ourfont"); Texture2D backgroundImage = Content.Load <Texture2D>("bg"); Texture2D bg = Content.Load <Texture2D>("bg2"); spriteBatch = new SpriteBatch(device); Effect ppEffect = Content.Load <Effect>("postprocessing"); postProcessor = new PostProcessor(device, ppEffect); //dummy menus startGameEasy = new MenuWindow(null, null, null); startGameNormal = new MenuWindow(null, null, null); startGameHard = new MenuWindow(null, null, null); MenuWindow menuMain = new MenuWindow(menuFont, "Main Menu", backgroundImage); MenuWindow menuNewGame = new MenuWindow(menuFont, "Start a New Game", bg); MenuWindow menuOptions = new MenuWindow(menuFont, "Options Menu", backgroundImage); menuList.Add(menuMain); menuList.Add(menuNewGame); menuList.Add(menuOptions); menuMain.AddMenuItem("New Game", menuNewGame); menuMain.AddMenuItem("Load Game", menuMain); menuMain.AddMenuItem("Options", menuOptions); menuMain.AddMenuItem("Exit Game", null); menuNewGame.AddMenuItem("Easy", startGameEasy); menuNewGame.AddMenuItem("Normal", startGameNormal); menuNewGame.AddMenuItem("Hard", startGameHard); menuNewGame.AddMenuItem("Back to Main menu", menuMain); menuOptions.AddMenuItem("Change controls", menuMain); menuOptions.AddMenuItem("Change graphics setting", menuMain); menuOptions.AddMenuItem("Change sound setting", menuMain); menuOptions.AddMenuItem("Back to Main menu", menuMain); activeMenu = menuMain; menuMain.WakeUp(); }