Vtj.Contest.Race.RaceLevel.KeyDown C# (CSharp) Method

KeyDown() protected method

protected KeyDown ( System.Html.ElementEvent e ) : void
e System.Html.ElementEvent
return void
        protected override void KeyDown(ElementEvent e)
        {
            switch (Status)
            {
                case RaceStatus.Win:
                    foreach (int handle in pendingTimers) Window.ClearTimeout(handle);
                    if (_practice) CurrentGame.ShowTitleScreen();
                    else CurrentGame.NextLevel();
                    break;

                case RaceStatus.Fail:
                    foreach (int handle in pendingTimers) Window.ClearTimeout(handle);
                    if (_practice) CurrentGame.ShowTitleScreen();
                    else CurrentGame.GameOver();
                    break;
            }
        }