Exemple #1
0
        private static void ApplicationOnIdle(GameForm gameForm)
        {
            NativeMessage message;

            while (!PeekMessage(out message, _handleRef, 0, 0, 0))
            {
                gameForm.Render();
            }
        }
Exemple #2
0
        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();
        }