Static Method Summary
| Static Public Methods | ||
| public static |
|
|
| public static |
getSchema(): {"seed": *} |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(root: GameRoot) |
|
Member Summary
| Public Members | ||
| public |
Mapping of 'X|Y' to chunk |
|
| public |
root: * |
|
| public |
|
|
Method Summary
| Public Methods | ||
| public |
Returns the given chunk by index |
|
| public |
getChunkAtTileOrNull(tileX: number, tileY: number): MapChunkView Gets a chunk if not existent for the given tile |
|
| public |
getLayerContentXY(x: number, y: number, layer: Layer): Entity Returns the tile content of a given tile |
|
| public |
getLayersContentsMultipleXY(x: number, y: number): Array<Entity> Returns the tile contents of a given tile |
|
| public |
getLowerLayerContentXY(x: number, y: number): BaseItem= Returns the lower layers content of the given tile |
|
| public |
getOrCreateChunkAtTile(tileX: number, tileY: number): MapChunkView Gets or creates a new chunk if not existent for the given tile |
|
| public |
getTileContent(tile: Vector, layer: Layer): Entity Returns the tile content of a given tile |
|
| public |
internalCheckTile(tile: Vector) Checks a given tile for validty |
|
| public |
isTileUsed(tile: Vector, layer: Layer): boolean Checks if the tile is used |
|
| public |
isTileUsedXY(x: number, y: number, layer: Layer): boolean Checks if the tile is used |
|
| public |
isValidTile(tile: Vector): boolean Checks if a given tile is within the map bounds |
|
| public |
placeStaticEntity(entity: Entity) Places an entity with the StaticMapEntity component |
|
| public |
removeStaticEntity(entity: Entity) Removes an entity with the StaticMapEntity component |
|
| public |
setTileContent(tile: Vector, entity: Entity) Sets the tiles content |
|
Inherited Summary
| From class BasicSerializableObject | ||
| public static |
|
|
| public static |
getId() |
|
| public static |
Should return the serialization schema |
|
| public static |
|
|
| public |
deserialize(data: any, root: import("./savegame_serializer").GameRoot): string | void |
|
| public |
|
|
Static Public Methods
public static getSchema(): {"seed": *} source
Should return the serialization schema
Override:
BasicSerializableObject#getSchemaReturn:
| {"seed": *} |
Public Constructors
public constructor(root: GameRoot) source
Fixes typeof DerivedComponent is not assignable to typeof Component, compiled out in non-dev builds
Override:
BasicSerializableObject#constructorParams:
| Name | Type | Attribute | Description |
| root | GameRoot |
Public Members
public root: * source
Public Methods
public getChunk(chunkX: number, chunkY: number): * source
Returns the given chunk by index
Return:
| * |
public getChunkAtTileOrNull(tileX: number, tileY: number): MapChunkView source
Gets a chunk if not existent for the given tile
public getLayerContentXY(x: number, y: number, layer: Layer): Entity source
Returns the tile content of a given tile
public getLayersContentsMultipleXY(x: number, y: number): Array<Entity> source
Returns the tile contents of a given tile
public getLowerLayerContentXY(x: number, y: number): BaseItem= source
Returns the lower layers content of the given tile
Return:
| BaseItem= |
public getOrCreateChunkAtTile(tileX: number, tileY: number): MapChunkView source
Gets or creates a new chunk if not existent for the given tile
public getTileContent(tile: Vector, layer: Layer): Entity source
Returns the tile content of a given tile
Params:
| Name | Type | Attribute | Description |
| tile | Vector | ||
| layer | Layer |
public internalCheckTile(tile: Vector) source
Checks a given tile for validty
Params:
| Name | Type | Attribute | Description |
| tile | Vector |
public isTileUsed(tile: Vector, layer: Layer): boolean source
Checks if the tile is used
Params:
| Name | Type | Attribute | Description |
| tile | Vector | ||
| layer | Layer |
public isValidTile(tile: Vector): boolean source
Checks if a given tile is within the map bounds
Params:
| Name | Type | Attribute | Description |
| tile | Vector |
public placeStaticEntity(entity: Entity) source
Places an entity with the StaticMapEntity component
Params:
| Name | Type | Attribute | Description |
| entity | Entity |
