diff options
Diffstat (limited to 'src/paperflight/static/update.js')
-rw-r--r-- | src/paperflight/static/update.js | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/paperflight/static/update.js b/src/paperflight/static/update.js index b953914..3a61647 100644 --- a/src/paperflight/static/update.js +++ b/src/paperflight/static/update.js @@ -1,16 +1,6 @@ -function isPointInRamp(x, y, ramp) { - var yDelta = (x - ramp.x) * ramp.slope - return ramp.x < x && x < ramp.x + ramp.width && ramp.y < y + yDelta && y + yDelta < ramp.y + ramp.height -} -function isPointInBox(x, y, box) { - return box.x <= x && x <= box.x + box.width && box.y <= y && y <= box.y + box.height -} -function isPlaneInBox(box) { - return isPointInBox(plane.x, plane.y, box) - || isPointInBox(plane.x + plane.width, plane.y, box) - || isPointInBox(plane.x + plane.width, plane.y + plane.height, box) - || isPointInBox(plane.x, plane.y + plane.height, box) -} +/** + * Update functions + */ function update() { t++ score++ |