fixed preloading and integrated vis
This commit is contained in:
@@ -228,7 +228,7 @@ export class VisLevel {
|
||||
const pos = Vector2.lerp(positions[0], positions[1], t);
|
||||
const width = this.screenCellWidth * simProjectile.size;
|
||||
const height = this.screenCellHeight * simProjectile.size;
|
||||
this.visMain.context.drawImage(this.assets.getImage("projectile.svg"),
|
||||
this.visMain.context.drawImage(this.assets.getImage("images/projectile.svg"),
|
||||
this.screenXOffset + pos.x * this.hexSize - width / 2,
|
||||
this.screenYOffset + pos.y * this.hexSize - height / 2,
|
||||
width,
|
||||
@@ -293,6 +293,6 @@ export class VisLevel {
|
||||
|
||||
private drawCellImage(context: CanvasRenderingContext2D, cell: SimCell, name: string) {
|
||||
const coords = this.getScreenCoords(cell.hex);
|
||||
context.drawImage(this.assets.getImage(name), coords.x, coords.y, this.screenCellWidth, this.screenCellHeight);
|
||||
context.drawImage(this.assets.getImage("images/" + name), coords.x, coords.y, this.screenCellWidth, this.screenCellHeight);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user