示例#1
0
文件: Form1.cs 项目: K2940/roolipeli
        public Form1()
        {
            InitializeComponent();

            _x           = 50;
            _y           = 50;
            _objsijainti = sijainti.down;
        }
示例#2
0
文件: Form1.cs 项目: K2940/roolipeli
 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;
     }
 }