public void Load(Pantheon gameReference) { mainBackgroundRect = new Rectangle((int)(gameReference.GraphicsDevice.Viewport.Width - .35 * SCREEN_WIDTH) / 2, (gameReference.GraphicsDevice.Viewport.Height - 400) / 2, (int)(.35 * SCREEN_WIDTH), 400); mainBackgroundTex = new Texture2D(gameReference.GraphicsDevice, 1, 1); mainBackgroundTex.SetData(new[] { Color.White }); splashScreen = gameReference.Content.Load<Texture2D>("Menu/PantheonText"); splashScreenMask = gameReference.Content.Load<Texture2D>("Menu/PantheonTextMask"); splashShine = gameReference.Content.Load<Texture2D>("Menu/Shine"); splashText = "The abridged..."; splashScreenRect = new Rectangle((int)(SCREEN_WIDTH/2 - (SCREEN_WIDTH * .75)/2), 200, (int)(SCREEN_WIDTH * .75), (int)(SCREEN_HEIGHT * .33)); creditsRect = new Rectangle((int)(SCREEN_WIDTH / 2 - (SCREEN_WIDTH * .75) / 2), 50, (int)(SCREEN_WIDTH * .75), (int)(SCREEN_HEIGHT * .33)); inventoryBackground = gameReference.Content.Load<Texture2D>("Inventory/InventoryBackground"); inventoryBackgroundTex = gameReference.Content.Load<Texture2D>("Inventory/InventoryBackgroundTexture"); inventory = new Inventory(SCREEN_WIDTH, SCREEN_HEIGHT, gameReference); loadDefaultMenu(gameReference); questManager = gameReference.QuestManager; first = true; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { rand = new Random(); ControlManager = new ControlManager(); int SCREEN_WIDTH = GraphicsDevice.Viewport.Width; int SCREEN_HEIGHT = GraphicsDevice.Viewport.Height; menu = new Menu(SCREEN_WIDTH, SCREEN_HEIGHT); player = new PlayerCharacter(this); debugFont = Content.Load<SpriteFont>("Fonts/DebugFont"); splashFont = Content.Load<SpriteFont>("Fonts/SplashFont"); hud = new HUD(GraphicsDevice, Content, SCREEN_WIDTH, SCREEN_HEIGHT, debugFont); currentLevel = new Level(GraphicsDevice); CutsceneManager = new CutsceneManager(GraphicsDevice); EventManager = new EventManager(this); QuestManager = new QuestManager(this); audioManager = new AudioManager(); base.Initialize(); }