SpikeWars: Added image drawing util.

This commit is contained in:
Jonathan Bernard
2016-07-28 18:15:47 -05:00
parent 7d0b953fbe
commit cad9df9ead
2 changed files with 5 additions and 0 deletions

View File

@ -49,4 +49,8 @@ export default class SpikeWarsArtist {
Math.floor(idx / this.cols) * this.tileHeight,
this.tileWidth, this.tileHeight); }
drawImage(image: CanvasImageSource, row: number, col: number): void {
this.canvas2d.drawImage(image,
row * this.tileWidth, col * this.tileWidth,
this.tileWidth, this.tileHeight); }
}