/// <summary> /// Returns true if the specified mouse button has been pressed since the last update. /// </summary> /// <param name="key">The mouse button to check.</param> /// <returns>True if the mouse button was recently pressed.</returns> public bool IsPressed(MouseButtons key) { return(!PreviousMouseState.IsDown(key) && CurrentMouseState.IsDown(key)); }
/* Mouse */ /// <summary> /// Returns true if the specified mouse button is currently pressed down. /// </summary> /// <param name="key">The mouse button to check.</param> /// <returns>True if the mouse button is currently down.</returns> public bool IsDown(MouseButtons key) { return(CurrentMouseState.IsDown(key)); }