From cfc0ac7c0d0b8fcd0e6c45a3dfbb22d9732effe7 Mon Sep 17 00:00:00 2001 From: Marty Killian Date: Tue, 5 Dec 2023 15:08:02 +0100 Subject: [PATCH] collides --- js/game.js | 2 +- js/objects.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/game.js b/js/game.js index 3a9ab56..ee6d8c9 100644 --- a/js/game.js +++ b/js/game.js @@ -93,7 +93,7 @@ function game() { update(); addPlayers(); remPlayers(); - player.update([],[], dt); + player.update(squares, circles, dt); for (var i = players.length - 1; i >= 0; i--) { players[i].update([],[], dt);//squares, circles } diff --git a/js/objects.js b/js/objects.js index 34e7914..cf83faa 100644 --- a/js/objects.js +++ b/js/objects.js @@ -10,5 +10,5 @@ for (var i = objects.squares.length - 1; i >= 0; i--) { for (var i = objects.circles.length - 1; i >= 0; i--) { let current = objects.circles[i] - circles.push(new Circle(current.x, current.y, current.w, current.h)); + circles.push(new Circle(current.x, current.y, current.r)); } \ No newline at end of file