aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2020-05-15 17:07:58 -0500
committerMark Powers <markppowers0@gmail.com>2020-05-15 17:07:58 -0500
commit3f7179f88deba4dfb0441cd414cec6db6f2d8cc0 (patch)
tree7c96014d3f30bffac67e952eb607e94d1545c6ee /src
parent7e469de9bc435b622eb415bf403727780ff95f4c (diff)
Add switch level
Diffstat (limited to 'src')
-rw-r--r--src/paperflight/static/items.js2
-rw-r--r--src/paperflight/static/levels.js33
2 files changed, 19 insertions, 16 deletions
diff --git a/src/paperflight/static/items.js b/src/paperflight/static/items.js
index 96f4767..14ec8eb 100644
--- a/src/paperflight/static/items.js
+++ b/src/paperflight/static/items.js
@@ -40,7 +40,7 @@ function constructSwitch(x, y, width, height, stateCount){
x, y, width, height, stateCount
}
}
-function constructRect(x, y, width, height, state){
+function constructSwitchRect(x, y, width, height, state){
return{
draw: drawSwitchRect,
update: updateSwitchRect,
diff --git a/src/paperflight/static/levels.js b/src/paperflight/static/levels.js
index bf3a301..2f0d172 100644
--- a/src/paperflight/static/levels.js
+++ b/src/paperflight/static/levels.js
@@ -36,8 +36,25 @@ levels[4].items.push(
constructVent(500, 550, 90, 600)
)
-levels[5] = createLevel("Downwards Dash", 5, 40, 460)
+levels[5] = createLevel("Switch madness", 0, 125, 420)
levels[5].items.push(
+ constructSwitch(115, 90, 40, 40, 4),
+ constructBlock(0, 200, 250, 10),
+ constructSwitchRect(250, 50, 10, 150, 0),
+
+ constructSwitch(500, 165, 40, 40, 4),
+
+ constructSwitch(115, 240, 40, 40, 4),
+ constructBlock(0, 350, 250, 10),
+ constructSwitchRect(250, 200, 10, 150, 1),
+
+ constructBlock(250, 350, 10, 100),
+
+ constructVent(0, 550, 250, 150, 3)
+)
+
+levels[6] = createLevel("Downwards Dash", 5, 40, 460)
+levels[6].items.push(
constructVent(420, 580, 60, 600),
constructCoin(40, 80),
constructVent(120, 100, 280, 100),
@@ -49,17 +66,3 @@ levels[5].items.push(
constructRamp(70, 480, 200, 10, 2 / 5),
constructCoin(170, 405),
)
-
-levels[6] = createLevel("Switch madness", 0, 40, 460)
-levels[6].items.push(
- constructSwitch(120, 400, 60, 60, 3),
- constructRect(300, 400, 60, 60, 0),
- constructRect(400, 400, 60, 60, 1),
- constructRect(500, 400, 60, 60, 2),
-)
-
-levels[7] = createLevel("Turn on the vent", 0, 40, 460)
-levels[7].items.push(
- constructSwitch(120, 400, 30, 60, 2),
- constructVent(200, 550, 60, 300, 1),
-) \ No newline at end of file