Exemple #1
0
        public Form1()
        {
            InitializeComponent();

            _x           = 50;
            _y           = 50;
            _objsijainti = sijainti.down;
        }
Exemple #2
0
 private void Form1_KeyPress(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Left)
     {
         _objsijainti = sijainti.left;
     }
     else if (e.KeyCode == Keys.Right)
     {
         _objsijainti = sijainti.right;
     }
     else if (e.KeyCode == Keys.Up)
     {
         _objsijainti = sijainti.up;
     }
     else if (e.KeyCode == Keys.Down)
     {
         _objsijainti = sijainti.down;
     }
 }