From 7cf56601fbb3ab8ee32c73b02aa00db004eca738 Mon Sep 17 00:00:00 2001 From: loglot <88983354+loglot@users.noreply.github.com> Date: Tue, 29 Aug 2023 13:48:42 -0500 Subject: [PATCH] fixed the first setting --- lib/draw.js | 8 +++----- lib/lib.js | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/draw.js b/lib/draw.js index a4ae395..c142ece 100644 --- a/lib/draw.js +++ b/lib/draw.js @@ -11,12 +11,10 @@ let draw = { this.DrawStroked("yet another collectathon", 250, 200) this.DrawStroked("press space to start", 260, 500) this.DrawStroked(`growth on coin: ${player.GrowOnCoin ? "yes" : "no"} (press t to flip)`, 260, 600) - } else{ - if (coin.Exists) - coin.checkPlayerCollision() - this.Circ(player.R, "#afbfaf", player.X, player.Y, true) + } else { if (coin.Exists) { -// console.log (coin) + coin.checkPlayerCollision() + this.Circ(player.R, "#afbfaf", player.X, player.Y, true) this.Circ(coin.R, "yellow", coin.X, coin.Y, true) } diff --git a/lib/lib.js b/lib/lib.js index f727a4a..52d3919 100644 --- a/lib/lib.js +++ b/lib/lib.js @@ -216,7 +216,7 @@ let keyManager = { } if (this.isKeyPressed("Digit1")) { - misc.GrowPlayerOnCoin = !misc.GrowPlayerOnCoin; + player.GrowOnCoin = !player.GrowOnCoin; } } else { if (this.isKeyPressed("KeyW")) {