/// <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() { // Console.WriteLine(SteamFriends.GetPersonaName()); base.Initialize(); initiateActions(); ResolutionUtility.bMouseIsVisible = this.IsMouseVisible; hitboxHelp = Content.Load <Texture2D>(@"Graphics\HitBoxHelp"); selectionTexture = Content.Load <Texture2D>(@"Graphics\MainMenu\TestRectangle"); mapBorderHelp = Content.Load <Texture2D>(@"Graphics\Tiles\Basic\BorderTest"); WhiteTex = Content.Load <Texture2D>(@"White"); scenes.Insert((int)(Screens.MainMenu), new MainMenu()); scenes.Insert((int)(Screens.MainGameStart), new NewGameScene()); scenes.Insert((int)(Screens.MainGameContinue), new ContinueGameScene()); scenes.Insert((int)(Screens.OWGame), new OWGame()); scenes.Insert((int)(Screens.BGame), new MainGame()); scenes.Insert((int)(Screens.Options), new Options()); scenes.Insert((int)(Screens.ExitGame), new Scene()); scenes.Insert((int)(Screens.Editor), new Editor()); CursorUtility.Initialize(this); MainGUI.Initialize(this); if (!bRunEditMode) { scenes[SceneUtility.currentScene].Initialize(this); } graphics.PreferMultiSampling = true; graphics.PreferredBackBufferWidth = this.GraphicsDevice.DisplayMode.Width; graphics.PreferredBackBufferHeight = this.GraphicsDevice.DisplayMode.Height; // this.Window.Position = new Point(100, 100); //graphics.IsFullScreen = true; this.IsMouseVisible = false; graphics.ApplyChanges(); LoadAssets(); this.Window.AllowUserResizing = false; //Window.IsBorderless = true; Window.AllowAltF4 = true; //Window.Location = Point.Zero; //900,506 ResolutionUtility.WindowSizeBeforeFullScreen = new Vector2(1366, 768); ResolutionUtility.AdjustResolution(1366, 768, graphics); gameRender = new RenderTarget2D(GraphicsDevice, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight); gameRender = new RenderTarget2D(GraphicsDevice, 1366, 768); UIRender = new RenderTarget2D(GraphicsDevice, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight); monitorSize = new Vector2(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height); Console.WriteLine("Primary Monitor Size: " + monitorSize); EditorFileWriter.LoadSaveSettings(); startScreen = new StartScreen(); #if !DEBUG // GameProcessor.Launch(); #endif // GameProcessor.Launch(); }