Skip to content

Commit dd57f6b

Browse files
author
divanov
committed
fix(game): fix bird rendering position
1 parent 5ed50c2 commit dd57f6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

game.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Game.prototype.display = function(){
260260
this.ctx.translate(this.birds[i].x, this.birds[i].y);
261261
this.ctx.translate(this.birds[i].width/2, this.birds[i].height/2);
262262
this.ctx.rotate(Math.PI/2 * this.birds[i].gravity/20);
263-
this.ctx.drawImage(images.bird, -this.birds[i].width, -this.birds[i].height/2, this.birds[i].width, this.birds[i].height);
263+
this.ctx.drawImage(images.bird, -this.birds[i].width/2, -this.birds[i].height/2, this.birds[i].width, this.birds[i].height);
264264
this.ctx.restore();
265265
}
266266
}

0 commit comments

Comments
 (0)