/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void InputDevice_KeyDown(object sender, InputDevice.KeyEventArgs e) { if (e.Key == Keys.F1) { //DevCon.Show( this ); } if (e.Key == Keys.F2) { Parameters.ToggleVSync(); } if (e.Key == Keys.F5) { Reload(); } if (e.Key == Keys.F12) { GraphicsDevice.Screenshot(); } if (e.Key == Keys.Escape) { Exit(); } if (e.Key==Keys.P) { if (soundInstance==null) { Log.Message("Play sound"); soundInstance = soundEffect.CreateInstance(); soundInstance.Apply3D( listener, emitter ); soundInstance.IsLooped = true; soundInstance.Play(); } else { soundInstance.Play(); } } if (e.Key==Keys.I && soundInstance!=null) { soundInstance.Stop(false); } if (e.Key==Keys.O && soundInstance!=null) { var state = soundInstance.State; if (state==SoundState.Paused) { soundInstance.Resume(); } if (state==SoundState.Playing) { soundInstance.Pause(); } } if (e.Key==Keys.U && soundInstance!=null) { soundInstance.Stop(true); } if (e.Key==Keys.B) { soundEffectBite.Play(); } }
void InputDevice_MouseScroll( object sender, InputDevice.MouseScrollEventArgs e ) { Log.Message("...mouse scroll event : {0}", e.WheelDelta ); scrollValue += e.WheelDelta; }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void InputDevice_KeyDown( object sender, InputDevice.KeyEventArgs e ) { if (e.Key == Keys.F1) { DevCon.Show(this); } if (e.Key == Keys.F2) { Parameters.VSyncInterval = (Parameters.VSyncInterval == 0) ? 1 : 0; } if (e.Key == Keys.F5) { Reload(); } if (e.Key == Keys.F12) { GraphicsDevice.Screenshot(); } if (e.Key == Keys.Escape) { Exit(); } }
void InputDevice_KeyPress( object sender, InputDevice.KeyPressArgs e ) { Log.Message("Key press : {0}", e.KeyChar ); }
void InputDevice_KeyUp( object sender, InputDevice.KeyEventArgs e ) { Log.Message("...key up event : {0}", e.Key ); }
void InputDevice_FormKeyUp( object sender, InputDevice.KeyEventArgs e ) { Log.Message("Form key up : {0}", e.Key ); }
void InputDevice_KeyDown( object sender, InputDevice.KeyEventArgs e ) { Log.Message("...key down event : {0}", e.Key ); if (e.Key == Keys.F1) { DevCon.Show( this ); } if (e.Key == Keys.F2) { Parameters.ToggleVSync(); } if (e.Key == Keys.F5) { Reload(); } if (e.Key == Keys.F12) { GraphicsDevice.Screenshot(); } if (e.Key == Keys.Escape) { Exit(); } }
void InputDevice_KeyDown(object sender, InputDevice.KeyEventArgs e) { if (e.Key == Keys.Left) { if (k > 1) k--; thirstStep = false; gameCollection = (EntityCollection)stepList.Find(x => x.stepNumb == k).collection.Copy(null); queue.clear(); queue.GameCollection = gameCollection; Game.GetService<GameFieldService>().GameField.coolNoise(); pause = true; } if (e.Key == Keys.Right) { if (k < stepList.Count) { if (!thirstStep) k++; thirstStep = false; gameCollection = (EntityCollection)stepList.Find(x => x.stepNumb == k).collection.Copy(null); queue.clear(); queue.GameCollection = gameCollection; Game.GetService<GameFieldService>().GameField.coolNoise(); pause = true; } } if (e.Key == Keys.Space) { pause = false; thirstStep = true; } }
void InputDeviceOnKeyDown(object sender, InputDevice.KeyEventArgs keyEventArgs) { float multiplayer = 1.0f; if (InputDevice.IsKeyDown(Keys.LeftShift)) multiplayer = 10.0f; if (keyEventArgs.Key == Keys.T) minDistance -= 1.0f * multiplayer; if (keyEventArgs.Key == Keys.Y) minDistance += 1.0f * multiplayer; if (keyEventArgs.Key == Keys.G) maxDistance -= 1.0f * multiplayer; if (keyEventArgs.Key == Keys.H) maxDistance += 1.0f * multiplayer; if (keyEventArgs.Key == Keys.B) textureScale -= 1.0f * multiplayer; if (keyEventArgs.Key == Keys.N) textureScale += 1.0f * multiplayer; if (keyEventArgs.Key == Keys.Q) wireframe = !wireframe; }
void InputDevice_MouseScroll( object sender, InputDevice.MouseScrollEventArgs e ) { var hovered = GetHoveredFrame(); if ( hovered!=null ) { hovered.OnMouseWheel( e.WheelDelta ); } }
void InputDevice_KeyDown(object sender, InputDevice.KeyEventArgs e) { if (e.Key == Keys.S) isNoiseMap = !isNoiseMap; }
void InputDevice_KeyDown ( object sender, InputDevice.KeyEventArgs e ) { if (e.Key == Keys.F1) { //DevCon.Show( this ); } if (e.Key == Keys.F2) { Parameters.ToggleVSync(); } if (e.Key == Keys.F5) { Reload(); } if (e.Key == Keys.F12) { GraphicsDevice.Screenshot(); } if (e.Key == Keys.Escape) { Exit(); } }