void Keyboard_KeyDown( object sender, KeyEventArgs e ) { if (e.Key==UseWeapon1) { weaponControl &= ~UserCtrlFlags.AllWeapon; weaponControl |= UserCtrlFlags.Machinegun; } if (e.Key==UseWeapon2) { weaponControl &= ~UserCtrlFlags.AllWeapon; weaponControl |= UserCtrlFlags.Shotgun; } if (e.Key==UseWeapon3) { weaponControl &= ~UserCtrlFlags.AllWeapon; weaponControl |= UserCtrlFlags.SuperShotgun; } if (e.Key==UseWeapon4) { weaponControl &= ~UserCtrlFlags.AllWeapon; weaponControl |= UserCtrlFlags.GrenadeLauncher; } if (e.Key==UseWeapon5) { weaponControl &= ~UserCtrlFlags.AllWeapon; weaponControl |= UserCtrlFlags.RocketLauncher; } if (e.Key==UseWeapon6) { weaponControl &= ~UserCtrlFlags.AllWeapon; weaponControl |= UserCtrlFlags.Chaingun; } if (e.Key==UseWeapon7) { weaponControl &= ~UserCtrlFlags.AllWeapon; weaponControl |= UserCtrlFlags.Railgun; } if (e.Key==UseWeapon8) { weaponControl &= ~UserCtrlFlags.AllWeapon; weaponControl |= UserCtrlFlags.HyperBlaster; } if (e.Key==UseWeapon9) { weaponControl &= ~UserCtrlFlags.AllWeapon; weaponControl |= UserCtrlFlags.BFG; } }
void Keyboard_KeyDown ( object sender, KeyEventArgs e ) { if (e.Key==Keys.F5) { Builder.SafeBuild(); Game.Reload(); } //if (e.Key==Keys.P ) { // videoPlayer.Play(video); //} //if (e.Key==Keys.O ) { // videoPlayer.Stop(); //} //*/ }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void InputDevice_KeyUp ( object sender, KeyEventArgs e ) { if (e.Key==Keys.LeftButton || e.Key==Keys.RightButton) { ReleaseFrame( GetHoveredFrame(), e.Key ); } }
void Keyboard_KeyDown ( object sender, KeyEventArgs e ) { if (e.Key==Keys.F5) { Builder.SafeBuild(); Game.Reload(); } if (e.Key == Keys.LeftShift) { viewLayer.GlobeCamera.ToggleViewToPointCamera(); } }