Exemplo n.º 1
0
        private void LanderGui_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.W:
                _lander.IsMainEngineFiring = true;
                break;

            case Keys.A:
                _lander.IsRightThrusterFiring = true;
                break;

            case Keys.D:
                _lander.IsLeftThrusterFiring = true;
                break;

            case Keys.Space:
                _lander.Halt();
                break;

            case Keys.F5:
                _lander.Reset();
                break;
            }
        }