diff --git a/game.js b/game.js index e82bd7a..0864638 100644 --- a/game.js +++ b/game.js @@ -257,8 +257,7 @@ Game.prototype.display = function(){ for(var i in this.birds){ if(this.birds[i].alive){ this.ctx.save(); - this.ctx.translate(this.birds[i].x, this.birds[i].y); - this.ctx.translate(this.birds[i].width/2, this.birds[i].height/2); + this.ctx.translate(this.birds[i].x + this.birds[i].width/2, this.birds[i].y + this.birds[i].height/2); this.ctx.rotate(Math.PI/2 * this.birds[i].gravity/20); this.ctx.drawImage(images.bird, -this.birds[i].width/2, -this.birds[i].height/2, this.birds[i].width, this.birds[i].height); this.ctx.restore();