コード例 #1
0
ファイル: Program.cs プロジェクト: tj-miller/TextAdventure
        private static void ApplicationOnIdle(GameForm gameForm)
        {
            NativeMessage message;

            while (!PeekMessage(out message, _handleRef, 0, 0, 0))
            {
                gameForm.Render();
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: tj-miller/TextAdventure
        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();
        }