Methods
-
rectangle_clone(rectangle)
-
Returns a new rectangle with the same x, y, width, and height properties of the original.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description rectanglerectangle to clone
Code Equivalent:
rectangle.clone() -
rectangle_contains(rectangle, x, y)
-
Returns true/false if the rectangle contains the given coordinates.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description rectanglerectangle to check
xNumber x coordinate to check
yNumber y coordinate to check
Code Equivalent:
Phaser.Rectangle.contains(rectangle, x, y) -
rectangle_contains_point(rectangle, point)
-
Returns true/false if the rectangle contains the point.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description rectanglerectangle to check
pointpoint to check
Code Equivalent:
Phaser.Rectangle.containsPoint(rectangle, point) -
rectangle_contains_rect(rectangle_a, rectangle_b)
-
Returns true/false if one rectangle is fulling contained within another.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description rectangle_athe first rectangle to check
rectangle_bthe second rectangle to check
Code Equivalent:
Phaser.Rectangle.containsRect(rectangle_a, rectangle_b) -
rectangle_create(x, y, width, height)
-
Creates a rectangle with the given properties.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description xNumber x coordinate for the new rectangle
yNumber y coordinate for the new rectangle
widthNumber width of the rectangle
heightNumber height of the rectangle
Code Equivalent:
new Phaser.Rectangle(x, y, width, height) -
rectangle_get_numeric_field(object, field)
-
Returns the chosen numeric field value of the rectangle.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to get values from
fieldthe field to get values of
Code Equivalent:
Phaser.Rectangle.intersects(rectA, rectB) -
rectangle_get_point_field(object, field)
-
Returns the chosen point field value of the rectangle.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to get values from
fieldthe field to get values of
Code Equivalent:
object.field -
rectangle_intersects(rectA, rectB)
-
Returns true/false if the two rectangles intersect.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description rectAfirst rectangle to check
rectBsecond rectangle to check
Code Equivalent:
Phaser.Rectangle.intersects(rectA, rectB) -
rectangle_random(rectangle)
-
Returns a random x/y coordinate point from the rectangle.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description rectanglerectangle to get values from
Code Equivalent:
rectangle.random() -
rectangle_set_numeric_field(object, field, value)
-
Assign the chosen numeric field of the rectangle.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to set the value for
fieldthe field to set
valueNumber value to set the field to
Code Equivalent:
object.field = value; -
rectangle_set_point_field(object, field, point)
-
Assign the chosen point field of the rectangle.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to set the point for
fieldthe field to set
pointpoint to set the field to
Code Equivalent:
object.field = value;