public bool Evaluate(DGInput input) { bool returnvalue = true; KeyPress keypress; if (this.newPressOnly) keypress = input.TestKeyPress; else keypress = input.TestKeyDown; foreach (Keys key in keys) { if (complete) returnvalue = keypress(key) && returnvalue; else { if (keypress(key)) { Debug.WriteLine("input invoked! " + this.inputname, "INFO"); return true; } } } if (returnvalue && complete) Debug.WriteLine("input invoked! " + this.inputname, "INFO"); if (!complete) return false; return returnvalue; }
public bool Evaluate(DGInput input) { bool returnvalue = true; KeyPress keypress; if (this.newPressOnly) keypress = input.TestKeyPress; else keypress = input.TestKeyDown; returnvalue = keypress(key); if (returnvalue) Debug.WriteLine("input invoked! " + this.inputname, "INFO"); return returnvalue; }
public virtual void HandleInput(GameTime gametime, DGInput input) { }
public override void HandleInput(GameTime gametime, DGInput input) { fixture.WorldAnchorB = ConvertUnits.ToSimUnits(new Vector2(input.CurMouseState.X, input.CurMouseState.Y)); }