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(); } }
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(); } }