From 144c231d989b21a5323c258ec805c33807f8565a Mon Sep 17 00:00:00 2001 From: Blatts12 Date: Sat, 24 Nov 2018 13:42:17 +0100 Subject: [PATCH] consolelog gosciu 123 --- player.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) 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 +}