aboutsummaryrefslogtreecommitdiff
path: root/src/paperflight/static/draw.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/paperflight/static/draw.js')
-rw-r--r--src/paperflight/static/draw.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/paperflight/static/draw.js b/src/paperflight/static/draw.js
index de64e27..13ecce5 100644
--- a/src/paperflight/static/draw.js
+++ b/src/paperflight/static/draw.js
@@ -2,11 +2,12 @@ function draw() {
ctx.fillStyle = "#4444ff"
ctx.fillRect(0, 0, width, height)
- drawPlane()
currLevel.items.forEach(item => {
item.draw()
})
drawExit(currLevel.exit)
+
+ drawPlane()
ctx.fillStyle = "#222"
ctx.font = "20px Courier"
@@ -85,8 +86,11 @@ function drawSwitchRect(){
ctx.setLineDash([5, 5]);
ctx.beginPath()
ctx.moveTo(this.x, this.y)
+ ctx.lineTo(this.x + this.width, this.y)
ctx.lineTo(this.x + this.width, this.y + this.height)
- ctx.lineTo(this.x + this.width, this.y + this.height)
+ ctx.lineTo(this.x, this.y + this.height)
ctx.lineTo(this.x, this.y)
+ ctx.stroke()
+ ctx.setLineDash([]);
}
} \ No newline at end of file