MetaRotaterBuilding
Extends:
Constructor Summary
| Public Constructor | ||
| public |
|
|
Method Summary
| Public Methods | ||
| public |
getAdditionalStatistics(root: GameRoot, variant: string): Array<[string, string]> |
|
| public |
getAvailableVariants(root: GameRoot): * |
|
| public |
getDimensions(variant: string): * |
|
| public |
getIsRemovable(variant: string): * |
|
| public |
getIsRotateable(variant: string): * |
|
| public |
getIsUnlocked(root: GameRoot): * |
|
| public |
Returns the edit layer of the building |
|
| public |
getRenderPins(variant: string): * |
|
| public |
getShowLayerPreview(variant: string): * |
|
| public |
getSilhouetteColor(variant: string): * |
|
| public |
getSpecialOverlayRenderMatrix(rotation: number, rotationVariant: number, variant: string, entity: Entity): Array<number> | null |
|
| public |
setupEntityComponents(entity: Entity) Creates the entity at the given location |
|
| public |
updateVariants(entity: Entity, rotationVariant: number, variant: string) |
|
Inherited Summary
| From class MetaBuilding | ||
| public |
id: * |
|
| public |
computeOptimalDirectionAndRotationVariantAtTile(param0: object): {rotation: number, rotationVariant: number, connectedEntities?: Array<Entity>} Should compute the optimal rotation variant on the given tile |
|
| public |
createEntity(param0: object): * Creates the entity without placing it |
|
| public |
getAdditionalStatistics(root: GameRoot, variant: string): Array<[string, string]> Should return additional statistics about this building |
|
| public |
getAvailableVariants(root: GameRoot): undefined[] |
|
| public |
getBlueprintSprite(rotationVariant: number, variant: *): AtlasSprite Returns a sprite for blueprints |
|
| public |
getDimensions(variant: string): * Should return the dimensions of the building |
|
| public |
Whether to flip the orientation after a building has been placed - useful for tunnels. |
|
| public |
Returns whether the building has the direction lock switch available |
|
| public |
getId(): * Returns the id of this building |
|
| public |
getIsRemovable(variant: string): boolean Returns whether this building is removable |
|
| public |
getIsReplaceable(variant: *): boolean Returns whether this building can get replaced |
|
| public |
getIsRotateable(variant: string): boolean Returns whether this building is rotateable |
|
| public |
getIsUnlocked(root: GameRoot): boolean Returns whether this building is unlocked for the given game |
|
| public |
Returns the edit layer of the building |
|
| public |
getPlacementSound(variant: string): string Returns the placement sound |
|
| public |
getPreviewSprite(rotationVariant: number, variant: *): AtlasSprite Returns a preview sprite |
|
| public |
getRenderPins(variant: string): boolean Should return false if the pins are already included in the sprite of the building |
|
| public |
getRotateAutomaticallyWhilePlacing(variant: string): boolean Whether to rotate automatically in the dragging direction while placing |
|
| public |
getShowLayerPreview(variant: string): * Whether to show a preview of the layer when placing the building |
|
| public |
getSilhouetteColor(variant: string, rotationVariant: number): * Should return a silhouette color for the map overview or null if not set |
|
| public |
getSpecialOverlayRenderMatrix(rotation: number, rotationVariant: number, variant: string, entity: Entity): Array<number> | null Can return a special interlaved 9 elements overlay matrix for rendering |
|
| public |
getSprite(rotationVariant: number, variant: string): AtlasSprite Returns the sprite for a given variant |
|
| public |
Whether to stay in placement mode after having placed a building |
|
| public |
setupEntityComponents(entity: Entity, root: GameRoot) Should setup the entity components |
|
| public |
updateVariants(entity: Entity, rotationVariant: number, variant: string) Should update the entity to match the given variants |
|
Public Constructors
Public Methods
public getAdditionalStatistics(root: GameRoot, variant: string): Array<[string, string]> source
Should return additional statistics about this building
Override:
MetaBuilding#getAdditionalStatisticspublic getAvailableVariants(root: GameRoot): * source
Override:
MetaBuilding#getAvailableVariantsParams:
| Name | Type | Attribute | Description |
| root | GameRoot |
Return:
| * |
public getDimensions(variant: string): * source
Should return the dimensions of the building
Override:
MetaBuilding#getDimensionsParams:
| Name | Type | Attribute | Description |
| variant | string |
Return:
| * |
public getIsRemovable(variant: string): * source
Returns whether this building is removable
Override:
MetaBuilding#getIsRemovableParams:
| Name | Type | Attribute | Description |
| variant | string |
Return:
| * |
public getIsRotateable(variant: string): * source
Returns whether this building is rotateable
Override:
MetaBuilding#getIsRotateableParams:
| Name | Type | Attribute | Description |
| variant | string |
Return:
| * |
public getIsUnlocked(root: GameRoot): * source
Returns whether this building is unlocked for the given game
Override:
MetaBuilding#getIsUnlockedParams:
| Name | Type | Attribute | Description |
| root | GameRoot |
Return:
| * |
public getLayer(root: GameRoot, variant: string): Layer source
Returns the edit layer of the building
Override:
MetaBuilding#getLayerReturn:
| Layer |
public getRenderPins(variant: string): * source
Should return false if the pins are already included in the sprite of the building
Override:
MetaBuilding#getRenderPinsParams:
| Name | Type | Attribute | Description |
| variant | string |
Return:
| * |
public getShowLayerPreview(variant: string): * source
Whether to show a preview of the layer when placing the building
Override:
MetaBuilding#getShowLayerPreviewParams:
| Name | Type | Attribute | Description |
| variant | string |
Return:
| * |
public getSilhouetteColor(variant: string): * source
Should return a silhouette color for the map overview or null if not set
Override:
MetaBuilding#getSilhouetteColorParams:
| Name | Type | Attribute | Description |
| variant | string |
Return:
| * |
public getSpecialOverlayRenderMatrix(rotation: number, rotationVariant: number, variant: string, entity: Entity): Array<number> | null source
Can return a special interlaved 9 elements overlay matrix for rendering
public setupEntityComponents(entity: Entity) source
Creates the entity at the given location
Override:
MetaBuilding#setupEntityComponentsParams:
| Name | Type | Attribute | Description |
| entity | Entity |
