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"); } }
private void Window_KeyDown(object sender, KeyEventArgs e) { KeyIsPressed.SetTrue(e.Key); }