Skip to content
Snippets Groups Projects
Commit 06b651da authored by Bye's avatar Bye
Browse files

Smooth camera

parent 0e8f8a86
Branches
No related tags found
No related merge requests found
Subproject commit e0227fba7aae15c8482dbed73947bb62c2350a48
Subproject commit 04ed5f0a25ca36462ce82704d2312881ba099c79
......@@ -19,8 +19,8 @@ export default class Ground extends Entity {
draw() {
if (!(this.surface || this.below)) return;
canvas.tileImage(this.surface, roundToRatio(this.x), roundToRatio(this.y), this.width, 8*this.scale, 8*this.scale, 8*this.scale);
canvas.tileImage(this.below, roundToRatio(this.x), roundToRatio(this.y+8*this.scale), this.width, this.height-8*this.scale, 8*this.scale, 8*this.scale);
canvas.tileImage(this.surface, round(this.x), round (this.y), this.width, 8*this.scale, 8*this.scale, 8*this.scale);
canvas.tileImage(this.below, round(this.x), round(this.y+8*this.scale), this.width, this.height-8*this.scale, 8*this.scale, 8*this.scale);
// canvas.fillRect(this.x, this.y, this.width, this.height);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment