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;
        }
示例#3
0
 public virtual void HandleInput(GameTime gametime, DGInput input)
 {
 }
示例#4
0
 public override void HandleInput(GameTime gametime, DGInput input)
 {
     fixture.WorldAnchorB = ConvertUnits.ToSimUnits(new Vector2(input.CurMouseState.X, input.CurMouseState.Y));
 }