更新启动服务

This commit is contained in:
unamed 2022-02-02 01:55:41 +08:00
parent b031d46048
commit e1b9aa9b0e
7 changed files with 797 additions and 800 deletions

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="ch_ZN">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>HTML5魔塔样板JS进阶</title> <title>HTML5魔塔样板JS进阶</title>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="ch_ZN">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>HTML5魔塔样板</title> <title>HTML5魔塔样板</title>

View File

@ -294,7 +294,7 @@ var terndefs_f6783a0a_522d_417e_8407_94c67b692e50 = [
}, },
"title": { "title": {
"!type": "string", "!type": "string",
"!doc":" \"\u5efa\u7acb\u5f53\u9f20\u6807\u60ac\u505c\u5728\u663e\u793a\u7684\u8282\u70b9\u4e0a\u65f6\u5728\"\u5de5\u5177\u63d0\u793a\"\u5f39\u51fa\u7a97\u53e3\u4e2d\u663e\u793a\u7684\u6587\u672c.\"," "!doc": " \"\u5efa\u7acb\u5f53\u9f20\u6807\u60ac\u505c\u5728\u663e\u793a\u7684\u8282\u70b9\u4e0a\u65f6\u5728\"\u5de5\u5177\u63d0\u793a\"\u5f39\u51fa\u7a97\u53e3\u4e2d\u663e\u793a\u7684\u6587\u672c.\","
}, },
"width": { "width": {
"!type": "number", "!type": "number",
@ -966,7 +966,7 @@ var terndefs_f6783a0a_522d_417e_8407_94c67b692e50 = [
}, },
"isSafeInteger": { "isSafeInteger": {
"!type": "fn(testValue: ?) -> bool", "!type": "fn(testValue: ?) -> bool",
"!doc": " Number.isSafeInteger()方法确定所提供的值是否是一个安全整数的数字.安全整数是该数字的整数." , "!doc": " Number.isSafeInteger()方法确定所提供的值是否是一个安全整数的数字.安全整数是该数字的整数.",
}, },
"parseFloat": { "parseFloat": {
"!type": "fn(string: string) -> number", "!type": "fn(string: string) -> number",
@ -1197,11 +1197,11 @@ var terndefs_f6783a0a_522d_417e_8407_94c67b692e50 = [
}, },
"log10": { "log10": {
"!type": "fn(x: number) -> number", "!type": "fn(x: number) -> number",
"!doc": " Math.log10()函数返回数字的以10为底的对数." , "!doc": " Math.log10()函数返回数字的以10为底的对数.",
}, },
"log2": { "log2": {
"!type": "fn(x: number) -> number", "!type": "fn(x: number) -> number",
"!doc": " Math.log2()函数返回数字的以2为底的对数." , "!doc": " Math.log2()函数返回数字的以2为底的对数.",
}, },
"sign": { "sign": {
"!type": "fn(x: number) -> number", "!type": "fn(x: number) -> number",
@ -1249,19 +1249,19 @@ var terndefs_f6783a0a_522d_417e_8407_94c67b692e50 = [
"!type": "number", "!type": "number",
"!doc": "当前难度编号" "!doc": "当前难度编号"
}, },
"hatred":{ "hatred": {
"!type": "number", "!type": "number",
"!doc": "当前仇恨值" "!doc": "当前仇恨值"
}, },
"poison":{ "poison": {
"!type": "bool", "!type": "bool",
"!doc": "是否处于中毒状态" "!doc": "是否处于中毒状态"
}, },
"weak":{ "weak": {
"!type": "number", "!type": "number",
"!doc": "是否处于衰弱状态" "!doc": "是否处于衰弱状态"
}, },
"curse":{ "curse": {
"!type": "number", "!type": "number",
"!doc": "是否处于诅咒状态" "!doc": "是否处于诅咒状态"
}, },
@ -1609,7 +1609,7 @@ var terndefs_f6783a0a_522d_417e_8407_94c67b692e50 = [
"!doc": "固伤值" "!doc": "固伤值"
}, },
}, },
"item":{ "item": {
"!doc": "道具信息", "!doc": "道具信息",
"id": { "id": {
"!type": "string", "!type": "string",
@ -2152,7 +2152,7 @@ var terndefs_f6783a0a_522d_417e_8407_94c67b692e50 = [
"!type": "fn(color?: [number], time?: number, moveMode?: string, callback?: fn())" "!type": "fn(color?: [number], time?: number, moveMode?: string, callback?: fn())"
}, },
"updateDamage": { "updateDamage": {
"!doc": "重算并绘制地图显伤<br/>例如core.updateDamage(); // 更新当前地图的显伤,绘制在显伤层(废话)<br/>floorId: 地图id不填视为当前地图。预览地图时填写<br/>ctx: 绘制到的画布,如果填写了就会画在该画布而不是显伤层", "!doc": "注意请勿使用该函数请使用core.updateStatusBar()代替!!重算并绘制地图显伤<br/>例如core.updateDamage(); // 更新当前地图的显伤,绘制在显伤层(废话)<br/>floorId: 地图id不填视为当前地图。预览地图时填写<br/>ctx: 绘制到的画布,如果填写了就会画在该画布而不是显伤层",
"!type": "fn(floorId?: string, ctx?: string|CanvasRenderingContext2D)" "!type": "fn(floorId?: string, ctx?: string|CanvasRenderingContext2D)"
}, },
"drawDamage": { "drawDamage": {
@ -3466,7 +3466,7 @@ var terndefs_f6783a0a_522d_417e_8407_94c67b692e50 = [
"!doc": "地图中间绘制一段文字", "!doc": "地图中间绘制一段文字",
"!type": "fn(contents: string, callback?: fn())" "!type": "fn(contents: string, callback?: fn())"
}, },
"drawConfirmBox":{ "drawConfirmBox": {
"!doc": "绘制一个确认框<br/>此项会打断事件流如需不打断版本的请使用core.myconfirm()<br/>text: 要绘制的内容,支持 ${} 语法<br/>yesCallback: 点击确认后的回调<br/>noCallback: 点击取消后的回调", "!doc": "绘制一个确认框<br/>此项会打断事件流如需不打断版本的请使用core.myconfirm()<br/>text: 要绘制的内容,支持 ${} 语法<br/>yesCallback: 点击确认后的回调<br/>noCallback: 点击取消后的回调",
"!type": "fn(text: string, yesCallback?: fn(), noCallback?: fn())" "!type": "fn(text: string, yesCallback?: fn(), noCallback?: fn())"
}, },

View File

@ -521,9 +521,6 @@ core.prototype._forwardFunc = function (name, funcname) {
var parameters = (parameterInfo == null ? "" : parameterInfo[1]).replace(/\s*/g, '').replace(/,/g, ', '); var parameters = (parameterInfo == null ? "" : parameterInfo[1]).replace(/\s*/g, '').replace(/,/g, ', ');
// core[funcname] = new Function(parameters, "return core."+name+"."+funcname+"("+parameters+");"); // core[funcname] = new Function(parameters, "return core."+name+"."+funcname+"("+parameters+");");
eval("core." + funcname + " = function (" + parameters + ") {\n\treturn core." + name + "." + funcname + "(" + parameters + ");\n}"); eval("core." + funcname + " = function (" + parameters + ") {\n\treturn core." + name + "." + funcname + "(" + parameters + ");\n}");
if (name == 'plugin') {
console.error("插件函数转发core." + funcname + " = core.plugin." + funcname);
}
} }
core.prototype.doFunc = function (func, _this) { core.prototype.doFunc = function (func, _this) {

View File

@ -1244,7 +1244,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 更新阻激夹域的伤害值 // 更新阻激夹域的伤害值
core.updateCheckBlock(); core.updateCheckBlock();
// 更新全地图显伤 // updateDamage只能在此处执行更新全地图显伤
core.updateDamage(); core.updateDamage();
}, },
"updateCheckBlock": function (floorId) { "updateCheckBlock": function (floorId) {

2
runtime.d.ts vendored
View File

@ -1865,7 +1865,7 @@ declare class maps {
getPlayingAnimates(name?: string): Array<number> getPlayingAnimates(name?: string): Array<number>
/** 加载某个楼层(从剧本或存档中) */ /** 加载某个楼层(从剧本或存档中) */
loadFloor(floorId?: string, map?: any): ResolvedMap loadFloor(floorId: string, map?: any): ResolvedMap
/** 根据需求解析出blocks */ /** 根据需求解析出blocks */
extractBlocks(map?: any): void extractBlocks(map?: any): void

Binary file not shown.