hyades.MultiInputDevice.IsPressed C# (CSharp) Method

IsPressed() public method

public IsPressed ( Buttons button ) : bool
button Buttons
return bool
        public override bool IsPressed(Buttons button)
        {
            if(curr.IsButtonDown(button) && prev.IsButtonUp(button))
                return true;

            if (button == Buttons.A)
                if (curr_mouse.LeftButton == ButtonState.Pressed && prev_mouse.LeftButton == ButtonState.Released)
                    return true;

            if (button == Buttons.A || button == Buttons.B)
                if (curr_keyboard.IsKeyDown(Keys.Space) && prev_keyboard.IsKeyUp(Keys.Space))
                    return true;

            Keys key = button_map[button];
            return curr_keyboard.IsKeyDown(key) && prev_keyboard.IsKeyUp(key);
        }