diff options
Diffstat (limited to 'src/paperflight/static/draw.js')
-rw-r--r-- | src/paperflight/static/draw.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/paperflight/static/draw.js b/src/paperflight/static/draw.js index 0c940b6..4646581 100644 --- a/src/paperflight/static/draw.js +++ b/src/paperflight/static/draw.js @@ -82,10 +82,12 @@ function drawRamp() { ctx.fill() } function drawCoin() { - ctx.fillStyle = "yellow" - ctx.beginPath(); - ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2) - ctx.fill() + if (!this.collected) { + ctx.fillStyle = "yellow" + ctx.beginPath(); + ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2) + ctx.fill() + } } function drawExit(exit) { ctx.fillStyle = "green" |