SpikeWars: Added image drawing util.
This commit is contained in:
parent
7d0b953fbe
commit
cad9df9ead
@ -88,6 +88,7 @@ task minifyJavaScript(
|
||||
def argsArr = []
|
||||
argsArr << '--compilation_level=SIMPLE_OPTIMIZATIONS'
|
||||
argsArr << "--js_output_file=build/webroot/js/${project.name}-${project.version}.min.js"
|
||||
argsArr << '--language-in=ECMASCRIPT5'
|
||||
argsArr << "build/webroot/js/${project.name}-${project.version}.js"
|
||||
|
||||
args argsArr
|
||||
|
@ -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); }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user