private static void ApplicationOnIdle(GameForm gameForm) { NativeMessage message; while (!PeekMessage(out message, _handleRef, 0, 0, 0)) { gameForm.Render(); } }
private static void Main() { Engine.Objects.World world = GetWorld(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(true); var gameForm = new GameForm(world, world.StartingPlayer); Application.Idle += (sender, args) => ApplicationOnIdle(gameForm); Application.Run(gameForm); SoundSystem.Instance.Release(); }