diff options
Diffstat (limited to 'src/paperflight/static/update.js')
-rw-r--r-- | src/paperflight/static/update.js | 5 |
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 +} |