SpikeWars: Added image drawing util.
This commit is contained in:
@ -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); }
|
||||
}
|
||||
|
Reference in New Issue
Block a user