(...positions: number[])
| 174 | } |
| 175 | |
| 176 | private addWalls(...positions: number[]): void{ |
| 177 | // Create the wall entity |
| 178 | this.addEntity(new Wall(this, new Pos(0, 0))); |
| 179 | var wall: Wall = <Wall>(this.getLastEntity()); |
| 180 | |
| 181 | // Add the boxes |
| 182 | for(var i = 0; i < positions.length/4; i++){ |
| 183 | wall.addBox(new Pos(positions[i*4], positions[i*4+1]), new Pos(positions[i*4+2] - positions[i*4] + 1, positions[i*4+3] - positions[i*4+1] + 1)); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | private calcNewGlobalDrawingOffset(): void{ |
| 188 | // If the player is too low or too high on the screen (that's why we take the offset in account here), we set the offset to follow the player |
no test coverage detected