Class: Level2D

Level2D(headersopt, blocksopt)

2D Level in LevelZ

Constructor

new Level2D(headersopt, blocksopt)

Constructs a 2D Level.
Parameters:
Name Type Attributes Description
headers Map.<string, any> | Object.<string, any> <optional>
The headers of the level
blocks Set.<LevelObject> | Array.<LevelObject> <optional>
The blocks in the level
Source:

Extends

Members

blocks :Set.<LevelObject>

The blocks in the level.
Type:
Overrides:
Source:

coordinates

Gets all the coordinates of the blocks in the level.
Overrides:
Source:

dimension :Dimension

The dimension of the level.
Type:
Overrides:
Source:

headers :Map.<string, any>

The headers of the level.
Type:
  • Map.<string, any>
Overrides:
Source:

rawBlocks

Gets all the raw blocks in the level.
Overrides:
Source:

scroll

Returns the scroll direction of this 2D Level.
Source:

scroll

Sets the scroll direction of this 2D Level.
Source:

spawn

Gets the spawn point of the level.
Overrides:
Source:

spawn

Sets the spawn point for the level.
Overrides:
Source:

Methods

toString() → {string}

Gets the string representation of the level.
Overrides:
Source:
Returns:
The string representation of the level.
Type
string