Пример #1
0
        public GardenGame()
        {
            // frame border
            Form frm = (Form)Form.FromHandle(Window.Handle);

            frm.FormBorderStyle = FormBorderStyle.None;

            Instance = this;
            Content.RootDirectory = "Content";

            // create the TTengine for this game
            TTengineMaster.Create(this);

            // basic XNA graphics manager init here (before Initialize() and LoadContent() )
            graphics = new GraphicsDeviceManager(this);

            // DEBUG: insert below values eg = 1024; to test other resolutions
            myWindowWidth  = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
            myWindowHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;

            graphics.PreferredBackBufferWidth  = myWindowWidth;
            graphics.PreferredBackBufferHeight = myWindowHeight;
            graphics.IsFullScreen = false;
            IsFixedTimeStep       = false;
            graphics.SynchronizeWithVerticalRetrace = true;
        }
Пример #2
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     try
     {
         AppDomain.CurrentDomain.UnhandledException +=
             new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
         using (GardenGame game = new GardenGame())
         {
             game.Run();
         }
     }
     catch (Exception ex) {
         ReportErrorOverNetwork(ex);
         MsgBox.Show("Indiegame Garden: critical error",
                     CRITICAL_ERROR_MSG + ex.Message + "\n" + ex.ToString());
     }
 }
Пример #3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     try
     {
         using (GardenGame game = new GardenGame())
         {
             AppDomain.CurrentDomain.UnhandledException +=
                 new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
             game.Run();
         }
     }
     catch(Exception ex) {
         ReportErrorOverNetwork(ex);
         MsgBox.Show("IndiegameGarden: critical error",
                     "Critical error - sorry, it's still in Beta! " + ex.Message + "\n" + ex.ToString() );
     }
 }
Пример #4
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     try
     {
         using (GardenGame game = new GardenGame())
         {
             AppDomain.CurrentDomain.UnhandledException +=
                 new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
             game.Run();
         }
     }
     catch (Exception ex) {
         ReportErrorOverNetwork(ex);
         MsgBox.Show("IndiegameGarden: critical error",
                     "Critical error - sorry, it's still in Beta! " + ex.Message + "\n" + ex.ToString());
     }
 }
Пример #5
0
        public GardenGame()
        {
            // frame border
            Form frm = (Form)Form.FromHandle(Window.Handle);
            frm.FormBorderStyle = FormBorderStyle.None;

            Instance = this;
            Content.RootDirectory = "Content";

            // create the TTengine for this game
            TTengineMaster.Create(this);

            // basic XNA graphics manager init here (before Initialize() and LoadContent() )
            graphics = new GraphicsDeviceManager(this);
            
            // DEBUG: insert below values eg = 1024; to test other resolutions 
            myWindowWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width; 
            myWindowHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;

            graphics.PreferredBackBufferWidth = myWindowWidth;
            graphics.PreferredBackBufferHeight = myWindowHeight;
            graphics.IsFullScreen = false;
            IsFixedTimeStep = false;            
            graphics.SynchronizeWithVerticalRetrace = true;
        }