public static void ExitButton_MouseDown(object sender, EventArgs e) { if (EngineMessageBox.Visible) { return; } EngineMultimedia.Play(EngineSoundEnum.Click); EngineCore.Exit(); }
public void OnApplicationIdle(object sender, EventArgs e) { while (this.AppStillIdle) { EngineCore.Update(); EngineCore.Render(); } if (!EngineCore.GameRunning) { EngineCore.Exit(); } }
private void FormMain_FormClosing(object sender, FormClosingEventArgs e) { gameRunning = false; engine.Exit(); }