Skip to content

Commit

Permalink
moving platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll committed Dec 14, 2023
1 parent cf910a5 commit 51f4ff2
Show file tree
Hide file tree
Showing 4 changed files with 427 additions and 166 deletions.
5 changes: 4 additions & 1 deletion libs/game/obstacle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace sprites {
layer: number;
image: Image;
tileIndex: number;
tilemap: tiles.TileMap;
}

export class StaticObstacle implements Obstacle {
Expand All @@ -25,13 +26,15 @@ namespace sprites {

top: number;
left: number;
tilemap: tiles.TileMap;

constructor(image: Image, top: number, left: number, layer: number, tileIndex?: number) {
constructor(image: Image, top: number, left: number, layer: number, tileIndex?: number, tilemap?: tiles.TileMap) {
this.image = image;
this.layer = layer;
this.top = top;
this.left = left;
this.tileIndex = tileIndex;
this.tilemap = tilemap;
}

get x(): number {
Expand Down
Loading

0 comments on commit 51f4ff2

Please sign in to comment.