From e0552a705e3ddfd79a684ee7a67ca02f57fbb2bc Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Wed, 13 May 2020 22:23:28 -0500 Subject: Complete switches --- src/paperflight/static/draw.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/paperflight/static/draw.js') 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 -- cgit v1.2.3