gb.collidePointRect
From Gamebuino Wiki
Description
Checks if a specified point is within a rectangle.
Syntax
gb.collidePointRect(x1, y1, x2, y2, w, h);
Parameters
- x1: horizontal coordinate of the point.
- y1: vertical coordinate of the point.
- x2: horizontal coordinate of the top left corner of the rectangle.
- y2: vertical coordinate of the top left corner of the rectangle.
- w: width of the rectangle.
- h: height of the rectangle
Returns
- true: if the point is inside the rectangle.
- false: if the point is not inside the rectangle.
Example