Constructor Summary
| Public Constructor | ||
| public |
|
|
Member Summary
| Public Members | ||
| public |
|
|
| public |
|
|
| public |
|
|
Method Summary
| Public Methods | ||
| public |
addEntityToPaths(entity: Entity) Adds the given entity to the appropriate paths |
|
| public |
Verifies all belt paths |
|
| public |
deleteEntityFromPath(path: BeltPath, entity: Entity) Attempts to delete the belt from its current path |
|
| public |
deserializePaths(data: Array<any>): * Deserializes all belt paths |
|
| public |
drawBeltItems(parameters: DrawParameters) Draws all belt paths |
|
| public |
drawBeltPathDebug(parameters: DrawParameters) Draws the belt path debug overlays |
|
| public |
drawChunk_BackgroundLayer(parameters: DrawParameters, chunk: MapChunkView) Draws a given chunk |
|
| public |
findFollowUpEntity(entity: Entity): Entity | null Finds the follow up entity for a given belt. |
|
| public |
findSupplyingEntity(entity: Entity): Entity | null Finds the supplying belt for a given belt. |
|
| public |
onEntityAdded(entity: Entity) Called when an entity got added |
|
| public |
onEntityDestroyed(entity: Entity) Called when an entity got destroyed |
|
| public |
Recomputes the belt path network. |
|
| public |
Serializes all belt paths |
|
| public |
update() Updates all belts |
|
| public |
updateSurroundingBeltPlacement(entity: Entity) Updates the belt placement after an entity has been added / deleted |
|
Inherited Summary
| From class GameSystem | ||
| public static |
Returns static id |
|
| public |
root: * |
|
| public |
draw(parameters: DrawParameters) Override, do not call this directly, use startDraw() |
|
| public |
Should refresh all caches |
|
| public |
startDraw(parameters: DrawParameters) |
|
| public |
update() Updates the game system, override to perform logic |
|
| From class GameSystemWithFilter | ||
| public |
All entities which match the current components |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
internalPopEntityIfMatching(entity: Entity) |
|
| public |
Recomputes all target entities after the game has loaded |
|
| public |
internalPushEntityIfMatching(entity: Entity) |
|
| public |
internalReconsiderEntityToAdd(entity: Entity) |
|
| public |
internalRegisterEntity(entity: Entity) |
|
| public |
|
|
Static Public Methods
Public Constructors
public constructor() source
Constructs a new game system with the given component filter. It will process all entities which have all of the passed components
Override:
GameSystemWithFilter#constructorPublic Members
public beltAnimations: Object<enumDirection, Array<AtlasSprite>> source
public beltSprites: Object<enumDirection, Array<AtlasSprite>> source
Public Methods
public addEntityToPaths(entity: Entity) source
Adds the given entity to the appropriate paths
Params:
| Name | Type | Attribute | Description |
| entity | Entity |
public deleteEntityFromPath(path: BeltPath, entity: Entity) source
Attempts to delete the belt from its current path
public deserializePaths(data: Array<any>): * source
Deserializes all belt paths
Params:
| Name | Type | Attribute | Description |
| data | Array<any> |
Return:
| * |
public drawBeltItems(parameters: DrawParameters) source
Draws all belt paths
Params:
| Name | Type | Attribute | Description |
| parameters | DrawParameters |
public drawBeltPathDebug(parameters: DrawParameters) source
Draws the belt path debug overlays
Params:
| Name | Type | Attribute | Description |
| parameters | DrawParameters |
public drawChunk_BackgroundLayer(parameters: DrawParameters, chunk: MapChunkView) source
Draws a given chunk
Params:
| Name | Type | Attribute | Description |
| parameters | DrawParameters | ||
| chunk | MapChunkView |
public findFollowUpEntity(entity: Entity): Entity | null source
Finds the follow up entity for a given belt. Used for building the dependencies
Params:
| Name | Type | Attribute | Description |
| entity | Entity |
public findSupplyingEntity(entity: Entity): Entity | null source
Finds the supplying belt for a given belt. Used for building the dependencies
Params:
| Name | Type | Attribute | Description |
| entity | Entity |
public onEntityAdded(entity: Entity) source
Called when an entity got added
Params:
| Name | Type | Attribute | Description |
| entity | Entity |
public onEntityDestroyed(entity: Entity) source
Called when an entity got destroyed
Params:
| Name | Type | Attribute | Description |
| entity | Entity |
public recomputeAllBeltPaths() source
Recomputes the belt path network. Only required for old savegames
