Exemplo n.º 1
0
        private void DoEvents()
        {
            if (wiping)
            {
                return;
            }

            foreach (var e in events)
            {
                if (menu.DoEvent(e))
                {
                    continue;
                }

                if (e.Type == EventType.KeyDown)
                {
                    if (CheckFunctionKey(e.Key))
                    {
                        continue;
                    }
                }

                if (currentState == ApplicationState.Game)
                {
                    if (e.Key == DoomKey.Pause && e.Type == EventType.KeyDown)
                    {
                        sendPause = true;
                        continue;
                    }

                    if (game.DoEvent(e))
                    {
                        continue;
                    }
                }
                else if (currentState == ApplicationState.DemoPlayback)
                {
                    demoPlayback.DoEvent(e);
                }
            }

            events.Clear();
        }
Exemplo n.º 2
0
        private void DoEvents()
        {
            foreach (var e in events)
            {
                if (menu.DoEvent(e))
                {
                    continue;
                }

                if (state == ApplicationState.Game)
                {
                    if (game.DoEvent(e))
                    {
                        continue;
                    }
                }
            }
            events.Clear();
        }