SpikeWars: Added image drawing util.
This commit is contained in:
1 parent
7d0b953fbe
commit
cad9df9ead
2 files changed
+5
No files matched your search
@@ -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