更新技术美术明亮教具室版:字体、指路、教学与庆祝效果
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {buildAudio} from './audio-assets.mjs';
|
||||
import {applyBrightClassroom} from './bright-classroom-build.mjs';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
@@ -16,7 +17,7 @@ await build({ absWorkingDir: root, entryPoints: ['src/main.mjs'], outfile: 'game
|
||||
contents=contents.replace(" updateTutorial(bad);", " if(previewOnly)return;updateTutorial(bad);");
|
||||
const hintHandler=contents.split('\n').find(line=>line.startsWith("$('hint').onclick="));
|
||||
if(!hintHandler)throw Error('上游指路入口已变化');
|
||||
contents=contents.replace(hintHandler, `$('hint').onclick=()=>{record.hints++;focus=[];const segment=segmentHints.request(level,solution,path);setStatus(segment?'沿半透明光路连接两端;走偏可撤销或重开,正确到达后提示消失。':'已经完成。');draw();};`);
|
||||
contents=contents.replace(hintHandler, `$('hint').onclick=()=>{record.hints++;focus=[];const segment=segmentHints.request(level,solution,path);setStatus(segment?'沿引导带连接两端;走偏可撤销或重开,正确到达后提示消失。':'已经完成。');draw();};`);
|
||||
contents=contents.replace("function start(i,open=true){", "function start(i,open=true){segmentHints.clear();");
|
||||
contents=contents.replace("if(level.tutorial&&!bad.length&&!cleared)focus=", "if(false)focus=");
|
||||
contents+=`\nexport function hintView(){const h=segmentHints.view(level,solution,path);return h?{...h,visitedPolygons:polygons.filter(p=>path.includes(p.id)).map(p=>p.p.map(v=>[...v]))}:null;}\n`;
|
||||
@@ -32,8 +33,9 @@ export function renderLesson(target,l,route,w,h){
|
||||
if (!old)
|
||||
throw Error('上游导出入口变化,需要重新检查微信适配');
|
||||
contents = contents.replace(old, `$('export').onclick=()=>{saveRecord();exportRecords({version:pack.version,exportedAt:new Date().toISOString(),clearedIds:completed,records});setStatus('已保存试玩记录。');};`);
|
||||
contents=applyBrightClassroom(contents);
|
||||
return { contents: "import {PACK,document,window,localStorage,exportRecords,performance} from '../platform.mjs';\n" + contents, loader: 'js' };
|
||||
});
|
||||
} }] });
|
||||
console.log('Built campaign-200-r2: 200 levels');
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user