summaryrefslogtreecommitdiff
path: root/levelSelect.js
diff options
context:
space:
mode:
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 cdbca2b..6af87fa 100644
--- a/levelSelect.js
+++ b/levelSelect.js
@@ -3,22 +3,28 @@ const DEBUG = true;
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'],
@@ -85,6 +91,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');