Class: Drawable

Drawable(x, y)

Base class for all drawable objects.

Constructor

new Drawable(x, y)

Creates a drawable object.

Creates a drawable object.

Parameters:
Name Type Description
x number

The x-coordinate.

y number

The y-coordinate.

Source:

Members

hidden :boolean

Whether the object is hidden

.

Whether the object is hidden

Type:
  • boolean
Source:

x :number

X position

.

X position

Type:
  • number
Source:

y :number

Y position

.

Y position

Type:
  • number
Source:

Methods

draw()

Draws the object on the canvas.

Draws the object on the canvas. To be overridden by subclasses.

Source: