Inheritance: System.EventArgs
Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
		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();
			//} //*/
		}
Ejemplo n.º 3
0
		/// <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 );
			}
		}
Ejemplo n.º 4
0
		void Keyboard_KeyDown ( object sender, KeyEventArgs e )
		{
			if (e.Key==Keys.F5) {

				Builder.SafeBuild();
				Game.Reload();
			}


			if (e.Key == Keys.LeftShift) {
				viewLayer.GlobeCamera.ToggleViewToPointCamera();
			}
		}