|
|
|
@ -102,16 +102,17 @@ export class MetaBuilding {
|
|
|
|
|
* @param {GameRoot} param0.root
|
|
|
|
|
* @param {Vector} param0.origin Origin tile
|
|
|
|
|
* @param {number=} param0.rotation Rotation
|
|
|
|
|
* @param {number=} param0.originalRotation Original Rotation
|
|
|
|
|
* @param {number=} param0.rotationVariant Rotation variant
|
|
|
|
|
*/
|
|
|
|
|
createAndPlaceEntity({ root, origin, rotation = 0, rotationVariant = 0 }) {
|
|
|
|
|
createAndPlaceEntity({ root, origin, rotation = 0, originalRotation = 0, rotationVariant = 0 }) {
|
|
|
|
|
const entity = new Entity(root);
|
|
|
|
|
entity.addComponent(
|
|
|
|
|
new StaticMapEntityComponent({
|
|
|
|
|
spriteKey: "sprites/buildings/" + this.id + ".png",
|
|
|
|
|
origin: new Vector(origin.x, origin.y),
|
|
|
|
|
rotation,
|
|
|
|
|
originalRotation: rotation,
|
|
|
|
|
originalRotation,
|
|
|
|
|
tileSize: this.getDimensions().copy(),
|
|
|
|
|
silhouetteColor: this.getSilhouetteColor(),
|
|
|
|
|
})
|
|
|
|
|