aboutsummaryrefslogtreecommitdiff
path: root/src/paperflight/static/draw.js
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2020-05-13 22:23:28 -0500
committerMark Powers <markppowers0@gmail.com>2020-05-13 22:23:28 -0500
commite0552a705e3ddfd79a684ee7a67ca02f57fbb2bc (patch)
tree1eabf5520a821089e0c3b1314c7a9b5304254526 /src/paperflight/static/draw.js
parentcd8b5ef7da2116c20c6b4fa22fa94282fac49bda (diff)
Complete switches
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