Exemple #1
0
        private bool handleKeyDown(Keys keyCode)
        {
            if (keyCode == Keys.Up)
            {
                engino.Up();
            }
            else if (keyCode == Keys.Down)
            {
                engino.Down();
            }
            else if (keyCode == Keys.Left)
            {
                engino.Left();
            }
            else if (keyCode == Keys.Right)
            {
                engino.Right();
            }

            return(keyCode == Keys.Up || keyCode == Keys.Down || keyCode == Keys.Left || keyCode == Keys.Right);
        }