コード例 #1
0
        private void Window_KeyUp(object sender, KeyEventArgs e)
        {
            KeyIsPressed.SetFalse(e.Key);

            var key = e.Key;

            if (key == Key.Space)
            {
                FireWeapon("P1");
            }

            if ((key == Key.Enter))
            {
                FireWeapon("P2");
            }
        }
コード例 #2
0
 private void Window_KeyDown(object sender, KeyEventArgs e)
 {
     KeyIsPressed.SetTrue(e.Key);
 }