示例#1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (PixieGame game = new PixieGame())
     {
         game.Run();
     }
 }
示例#2
0
 public PixieGame()
 {
     instance            = this;
     graphics            = new GraphicsDeviceManager(this);
     myWindowWidth       = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
     myWindowHeight      = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
     Window.IsBorderless = true;
     graphics.PreferredBackBufferHeight = myWindowHeight;
     graphics.PreferredBackBufferWidth  = myWindowWidth;
     Content.RootDirectory = "Content";
     IsFixedTimeStep       = false;
 }
示例#3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     try
     {
         using (PixieGame game = new PixieGame())
         {
             game.Run();
         }
     }
     catch (Exception ex)
     {
         MsgBox.Show("FEIG! (Fatal Error In Game)",
                     "Fatal Error - if you want you can notify the author. Or whatever.\n" + ex.Message + "\n" + ex.ToString());
     }
 }
示例#4
0
 public PixieGame()
 {
     instance = this;
     graphics = new GraphicsDeviceManager(this);
     graphics.IsFullScreen = false;
     myWindowWidth         = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
     myWindowHeight        = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
     myScreenWidth         = myWindowWidth;
     myScreenHeight        = myWindowHeight;
     Window.IsBorderless   = true;
     // cap the window size! Not screen
     if (myWindowWidth > 1366)
     {
         myWindowWidth = 1366;
     }
     if (myWindowHeight > 768)
     {
         myWindowHeight = 768;
     }
     graphics.PreferredBackBufferHeight = myScreenHeight;
     graphics.PreferredBackBufferWidth  = myScreenWidth;
     Content.RootDirectory = "Content";
     IsFixedTimeStep       = false;
 }