(layer: any)
| 78 | } |
| 79 | |
| 80 | private parseCollisionLayer(layer: any): void { |
| 81 | const data: number[] = layer.data; |
| 82 | this.collisionGrid = []; |
| 83 | for (let y = 0; y < this.gridHeight; y++) { |
| 84 | const row: number[] = []; |
| 85 | for (let x = 0; x < this.gridWidth; x++) { |
| 86 | row.push(data[y * this.gridWidth + x] === 0 ? 0 : 1); |
| 87 | } |
| 88 | this.collisionGrid.push(row); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | private parseLocationsLayer(layer: any): void { |
| 93 | for (const obj of layer.objects) { |