Constructor
new LevelObject(block, coordinate)
Constructs a new LevelObject.
Parameters:
Name | Type | Description |
---|---|---|
block |
Block | string | The Block |
coordinate |
Coordinate | Array.<number> | The Coordinate |
Examples
new LevelObject(new Block('block'), new Coordinate2D(1, 2))
new LevelObject('block', [1, 2])
Classes
Members
block :Block
The Block of this LevelObject.
Type:
coordinate :Coordinate
The Coordinate of this LevelObject.
Type:
name
Gets the name of the block.
properties
Gets the properties of the block.
Methods
toString() → {string}
Returns the string representation of this LevelObject.
Returns:
The string representation of this LevelObject.
- Type
- string
Example
block<property=value>: [x, y]