diff --git a/src/engine/TileMap/TileMap.ts b/src/engine/TileMap/TileMap.ts index 882b97848..57dcdb081 100644 --- a/src/engine/TileMap/TileMap.ts +++ b/src/engine/TileMap/TileMap.ts @@ -201,6 +201,20 @@ export class TileMap extends Entity { this._motion.vel = val; } + /** + * Width of the whole tile map in pixels + */ + public get width(): number { + return this.tileWidth * this.columns * this.scale.x; + } + + /** + * Height of the whole tilemap in pixels + */ + public get height(): number { + return this.tileHeight * this.rows * this.scale.y; + } + public emit>(eventName: TEventName, event: TileMapEvents[TEventName]): void; public emit(eventName: string, event?: any): void; public emit | string>(eventName: TEventName, event?: any): void {