aboutsummaryrefslogtreecommitdiff
path: root/src/paperflight/static/levels.js
blob: bf3a3016426efe1a9270d5547ab3aba6d20160b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
 * Creates the levels object for the game
 */
function createLevel(title, coinsNeeded, exitX, exitY) {
    return {
        items: [constructBlock(0, 0, 800, 30)],
        exit: {
            x: exitX,
            y: exitY,
            radius: 20
        },
        title, coinsNeeded
    }
}
var levels = {}
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),
    constructBlock(580, 200, 10, 250),
    constructCoin(700, 240),
    constructCoin(700, 320),
    constructCoin(700, 400),
    constructRamp(70, 400, 200, 10, 2 / 5),
    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),
)