summaryrefslogtreecommitdiff
path: root/levelSelect.js
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2024-07-07 18:29:38 -0500
committersanine <sanine.not@pm.me>2024-07-07 18:29:38 -0500
commit95ee8172ae99c00efbfb1c8c105112f82711ae01 (patch)
tree318befb7568b6624b74f5d975dc8d4ea4b20155a /levelSelect.js
parenta4d923659f49ccd44e1d6bd09804ba658ca34ac4 (diff)
add level intro messages
Diffstat (limited to 'levelSelect.js')
-rw-r--r--levelSelect.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/levelSelect.js b/levelSelect.js
index 04c65a6..997bbb2 100644
--- a/levelSelect.js
+++ b/levelSelect.js
@@ -1,22 +1,28 @@
import{ setupLevel, setupLevelUi } from './level.js';
-function buildLevel(x, y, t) {
+function buildLevel(x, y, t, intro) {
const ts = t.slice(0, -1);
const tf = t[t.length-1];
- return setupLevel(ts.map(T => [ x(T), y(T) ]), [ x(tf), y(tf) ]);
+ return setupLevel(ts.map(T => [ x(T), y(T) ]), [ x(tf), y(tf) ], intro);
}
const levels = {
- 'initial jump': [ [], setupLevel([], [8, 0]) ],
- 'monopole harvesting': [ ['initial jump'], setupLevel([[3, 3]], [8,8]) ],
+ 'initial jump': [ [], setupLevel([], [8, 8], 'please launch the platform into the AMH processor.') ],
+ 'monopole harvesting 0': [ ['initial jump'], setupLevel([[3, 3]], [8,8], 'please ensure that all monopoles are collected before proceeding to the processor.') ],
+ 'monopole harvesting 1': [ ['initial jump'], setupLevel([[4, 2]], [8,4], 'the automated navigation system seems to have overshot on the Y axis. please correct.') ],
+ 'monopole harvesting 2': [ ['initial jump'], setupLevel([[1, 2]], [5,4], 'the automated navigation system seems to have missed the offset on the X axis. please correct.') ],
'inverted': [ ['initial jump'], setupLevel([[-3, -3]], [-8,-8]) ],
'double inverted': [ ['initial jump'], setupLevel([[-8, -8]], [-3,-3]) ],
'parabolic 0': [
['monopole harvesting'],
- buildLevel(t => t, t => t**2, [...Array(4).keys()].map(x => x)),
+ buildLevel(
+ t => t,
+ t => t**2,
+ [...Array(4).keys()].map(x => x),
+ ),
],
'parabolic 1': [
['monopole harvesting'],
@@ -78,6 +84,10 @@ export function setupLevelSelectUi(root, sfx) {
sfx.buttonClickAudio.currentTime = 0;
sfx.buttonClickAudio.play();
root.innerText = '';
+ const header = document.createElement('h1');
+ header.classList.add('centered');
+ header.innerText = name;
+ root.appendChild(header);
setupLevelUi(level, root, sfx);
}
const li = document.createElement('li');