refactor: 使用flutter对原先的web项目重构,正在进行中
This commit is contained in:
1 parent
273224f5cf
commit
18017f819a
205 files changed
+13563
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import tutorial from './tutorial.js';
|
||||
import jump from './jump.js';
|
||||
import endurance from './endurance.js';
|
||||
import boss from './boss.js';
|
||||
import troll from './troll.js';
|
||||
|
||||
const raw = [...tutorial, ...jump, ...endurance, ...boss, ...troll];
|
||||
raw.forEach((l, i) => { l.index = i; l.builtin = true; });
|
||||
|
||||
export const LEVELS = raw;
|
||||
|
||||
export const TYPE_LABEL = {
|
||||
jump: '跳刺', endur: '耐久', boss: 'BOSS', troll: '坑向', custom: '自制',
|
||||
};
|
||||
export const TYPE_CLASS = {
|
||||
jump: 't-jump', endur: 't-endur', boss: 't-boss', troll: 't-troll', custom: 't-custom',
|
||||
};
|
||||
|
||||
let uid = 0;
|
||||
export function makeCustomLevel(data) {
|
||||
return { ...data, id: 'u' + (Date.now() % 100000) + (uid++), type: 'custom', builtin: false, index: -1 };
|
||||
}
|
||||
|
||||
export function findLevel(id) {
|
||||
return LEVELS.find(l => l.id === id);
|
||||
}
|
||||
Reference in new issue
Block a user