Skip to content

Commit

Permalink
added public get width and height
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoung4242 committed Jun 1, 2024
1 parent c1908c4 commit c0ef558
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/engine/TileMap/TileMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ export class TileMap extends Entity {
this._motion.vel = val;
}

public get width(): number {
return this.tileWidth * this.columns;
}

public get height(): number {
return this.tileHeight * this.rows;
}

public emit<TEventName extends EventKey<TileMapEvents>>(eventName: TEventName, event: TileMapEvents[TEventName]): void;
public emit(eventName: string, event?: any): void;
public emit<TEventName extends EventKey<TileMapEvents> | string>(eventName: TEventName, event?: any): void {
Expand Down

0 comments on commit c0ef558

Please sign in to comment.