rectangle
Creates a rectangular hitbox given its position and size.
Return
A Hitbox2D representing the rectangle.
Parameters
x
The x coordinate of the top-left corner.
y
The y coordinate of the top-left corner.
width
The width of the rectangle.
height
The height of the rectangle.
Creates a rectangular hitbox given its position and size using integer parameters.
Return
A Hitbox2D representing the rectangle.
Parameters
x
The x coordinate of the top-left corner.
y
The y coordinate of the top-left corner.
width
The width of the rectangle.
height
The height of the rectangle.