From 67d08e1f07d6eb261b98e90e6c803d64c22c1969 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Thu, 14 May 2020 11:27:58 -0500 Subject: Add text item, create tutorial stages --- src/paperflight/static/levels.js | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'src/paperflight/static/levels.js') diff --git a/src/paperflight/static/levels.js b/src/paperflight/static/levels.js index e1628b1..70bd326 100644 --- a/src/paperflight/static/levels.js +++ b/src/paperflight/static/levels.js @@ -13,8 +13,31 @@ function createLevel(title, coinsNeeded, exitX, exitY) { } } var levels = {} -levels[1] = createLevel("Downwards Dash", 5, 40, 460) +levels[1] = createLevel("Welcome", 0, 400, 250) levels[1].items.push( + constructText(30, 60, "Use left and right to fly into the exit", "30px Courier") +) + +levels[2] = createLevel("Controls!", 0, 400, 250) +levels[2].items.push( + constructText(30, 60, "Press down or up to change speed", "30px Courier") +) + +levels[3] = createLevel("Coins!", 1, 400, 250) +levels[3].items.push( + constructText(30, 60, "Collect the needed coins to continue", "30px Courier"), + constructCoin(400, 200) +) + +levels[4] = createLevel("Getting harder...", 0, 700, 200) +levels[4].items.push( + constructText(30, 60, "Avoid walls, use the vent", "30px Courier"), + constructBlock(600, 120, 10, 500), + constructVent(500, 550, 90, 600) +) + +levels[5] = createLevel("Downwards Dash", 5, 40, 460) +levels[5].items.push( constructVent(420, 580, 60, 600), constructCoin(40, 80), constructVent(120, 100, 280, 100), @@ -27,8 +50,8 @@ levels[1].items.push( constructCoin(170, 405), ) -levels[2] = createLevel("Switch madness", 0, 40, 460) -levels[2].items.push( +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), -- cgit v1.2.3