Beispiel #1
0
 public static void DisableFullScreen()
 {
     full_screen_                        = false;
     graphics_.IsFullScreen              = false;
     graphics_.PreferredBackBufferWidth  = 1280; //GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width / 2;
     graphics_.PreferredBackBufferHeight = 720;  //GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height / 2;
     graphics_.ApplyChanges();
     Background.Initialize(graphics_.PreferredBackBufferWidth, graphics_.PreferredBackBufferHeight);
 }
Beispiel #2
0
 public static void EnableFullScreen()
 {
     full_screen_                        = true;
     graphics_.IsFullScreen              = true;
     graphics_.PreferredBackBufferWidth  = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
     graphics_.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
     graphics_.ApplyChanges();
     Background.Initialize(graphics_.PreferredBackBufferWidth, graphics_.PreferredBackBufferHeight);
 }
Beispiel #3
0
        protected override void Initialize()
        {
            DateTime start = DateTime.Now;

            base.Initialize();
            Drawer.Initialize(graphics);
            Drawer.DisableFullScreen();
            Maps.Initialize();
            TitleScreen.Initialize();
            TitleScreen.Activate();
            Background.Initialize(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);
            Particles.Initialize();
            base.Initialize();
            Console.WriteLine("Initialization took " + (DateTime.Now - start).ToString());
            Message.Compute();
        }