Methods
-
create_graphics_object(x, y)
-
Adds a graphics object to use to draw primitive shapes.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description xNumber x position of the new graphics object
yNumber y position of the new graphics object
Code Equivalent:
game.add.graphics(value_x, value_y) -
draw_circle(x, y, diameter)
-
Draws a circle. Use inside of draw_shapes_with_colour
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description xNumber x position of the rectangle
yNumber y position of the rectangle
diameterNumber the diameter of the rectangle
Code Equivalent:
variable_graphics_object_name.drawCircle(value_x, value_y, value_diameter); -
draw_rectangle(x, y, width, height)
-
Draws a rectangle. Use inside of draw_shapes_with_colour
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description xNumber x position of the rectangle
yNumber y position of the rectangle
widthNumber the width of the rectangle
heightNumber the height of the rectangle
Code Equivalent:
variable_graphics_object_name.drawRect(value_x, value_y, value_w, value_h); -
draw_shapes_with_colour(colour, graphics)
-
Enables graphics filling for shapes.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description colourthe colour to fill the shapes with
graphicsthe graphics object to use
Code Equivalent:
`