From e87632f1bab6683ea6d8914bb291a16b8fd7f621 Mon Sep 17 00:00:00 2001 From: onezDerv Date: Sat, 28 Sep 2024 20:10:23 -0400 Subject: [PATCH] better controls --- js/index.js | 2 +- js/player.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/index.js b/js/index.js index daf7e9f..ae41537 100644 --- a/js/index.js +++ b/js/index.js @@ -118,7 +118,7 @@ Game.prototype.click = function () { if (player.health <= 0) { game = new Game(); } else { - player.bump(game); + player.bump(); } } diff --git a/js/player.js b/js/player.js index b011343..097a4ae 100644 --- a/js/player.js +++ b/js/player.js @@ -20,11 +20,11 @@ Player.prototype.bump = function () { player.dir *= -1; } - player.vel.x *= 0.9; - player.vel.y *= 0.9; + player.vel.x *= 0.3; + player.vel.y *= 0.3; - player.vel.x += Math.sin(player.rot) * 8; - player.vel.y -= Math.cos(player.rot) * 8; + player.vel.x += Math.sin(player.rot) * 12; + player.vel.y -= Math.cos(player.rot) * 12; player.ticks = 0; } \ No newline at end of file