aboutsummaryrefslogtreecommitdiff
path: root/src/paperflight/static/update.js
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2020-05-13 21:59:10 -0500
committerMark Powers <markppowers0@gmail.com>2020-05-13 21:59:10 -0500
commitcd8b5ef7da2116c20c6b4fa22fa94282fac49bda (patch)
treeb2731adc51f0a215fc7796a396df131998f8b153 /src/paperflight/static/update.js
parent1855e0c673b06399ca89aa0c705d30b1a9ea3b97 (diff)
Add height to vent
Diffstat (limited to 'src/paperflight/static/update.js')
-rw-r--r--src/paperflight/static/update.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/paperflight/static/update.js b/src/paperflight/static/update.js
index 296308f..226d015 100644
--- a/src/paperflight/static/update.js
+++ b/src/paperflight/static/update.js
@@ -17,7 +17,8 @@ function update() {
}
}
function updateVent() {
- if (plane.x >= this.x - plane.width && plane.x <= this.x + this.width && plane.y < this.y) {
+ if (plane.x >= this.x - plane.width && plane.x <= this.x + this.width && this.y - this.height < plane.y && plane.y < this.y) {
+ // console.log(plane.y, this.y, this.y-this.height)
plane.y -= 2
}
}
@@ -45,4 +46,4 @@ function updateCoin(){
this.collected = true
collected++
}
-} \ No newline at end of file
+}