diff --git a/player.js b/player.js index 4243145..303a15d 100644 --- a/player.js +++ b/player.js @@ -51,19 +51,7 @@ function Player() { this.x -= this.velocity; this.collisonBox.x -= this.velocity; } - console.log() - //this.x + this.w / 2 - (this.w / 4); - //żeby nie wyleciało poza map - /* - if(this.x < 0){ - this.x = 0; - this.collisonBox.x = this.x + (this.w / 3); - } - else if (this.x + this.w > canvas.width){ - this.x = canvas.width - this.w; - this.collisonBox.x = this.x + (this.w / 3); - } - */ + if(this.x < -10){ this.x = -10; this.collisonBox.x = this.x + (this.w / 3); @@ -121,4 +109,4 @@ function Player() { -} \ No newline at end of file +}