/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
public void Run() { this.Show(); this.Activate(); mGameData = new Game1(); mGameData.Initialize(); while (this.IsDisposed == false && Created) { if (Form.ActiveForm != this) { System.Threading.Thread.Sleep(500); Application.DoEvents(); continue; } FrameUpdate(); mGameData.Update(); if (!Created) break; Draw(); Application.DoEvents(); } }