update comments

This commit is contained in:
ckcz123 2019-04-06 13:23:21 +08:00
parent d7a205889a
commit f43a872895
9 changed files with 1444 additions and 1421 deletions

View File

@ -775,8 +775,9 @@ core.getCurrentEnemys(floorId)
另外值得注意的是如果设置了某个怪物的displayIdInBook则会返回对应的怪物。 另外值得注意的是如果设置了某个怪物的displayIdInBook则会返回对应的怪物。
core.hasEnemyLeft(floorId) core.hasEnemyLeft(enemyId, floorId)
检查某个楼层是否还有剩余的怪物。等价于 core.getCurrentEnemys(floorId).length > 0 检查某个楼层是否还有剩余的指定怪物。floorId为楼层ID可忽略表示当前楼层。
enemyId如果不填或null则检查是否剩余任何怪物否则只检查是否剩余指定的某类怪物。
``` ```
## events.js ## events.js
@ -1743,7 +1744,7 @@ config为绘制的配置项目前可以包括如下几项
- align文字对齐方式仅在maxWidth设置时有效默认为'left'。 - align文字对齐方式仅在maxWidth设置时有效默认为'left'。
- fontSize字体大小如果不设置则使用剧情文本设置中的正文字体大小。 - fontSize字体大小如果不设置则使用剧情文本设置中的正文字体大小。
- lineHeight绘制的行距值如果不设置则使用fontSize*1.3即1.3被行距)。 - lineHeight绘制的行距值如果不设置则使用fontSize*1.3即1.3被行距)。
- time打字机效果。如果此项不为0则会用打字机效果逐个字进行绘制并设置core.status.event.interval定时器。 - time打字机效果。若不为0则会逐个字进行绘制并设置core.status.event.interval定时器。
core.drawTextBox(content, showAll) core.drawTextBox(content, showAll)
@ -1755,7 +1756,7 @@ showAll可选如果为true则不会使用打字机效果而全部显示
core.drawScrollText(content, time, lineHeight, callback) core.drawScrollText(content, time, lineHeight, callback)
绘制一个滚动字幕。content为绘制内容time为总滚动时间默认为5000lineHeight为行距比例默认为1.4)。 绘制一个滚动字幕。content为绘制内容time为总时间默认为5000lineHeight为行距比例默认为1.4)。
滚动字幕将绘制在UI上支持所有的文字效果如\n${}\r\\i等但不支持\t和\b效果。 滚动字幕将绘制在UI上支持所有的文字效果如\n${}\r\\i等但不支持\t和\b效果。
可以通过剧情文本设置中的align控制是否居中绘制offset控制其距离左边的偏移量。 可以通过剧情文本设置中的align控制是否居中绘制offset控制其距离左边的偏移量。

View File

@ -1,14 +1,17 @@
var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = /*
{ * 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括道具怪物图块属性楼层属性等内容
*/
var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": {
// --------------------------- 【道具】相关的表格配置 --------------------------- //
"items": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"items": { "items": {
"_type": "object",
"_data": {
"items": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"cls": { "cls": {
@ -88,8 +91,10 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
} }
}, },
"items_template": { 'cls': 'items', 'name': '新物品' }, "items_template": { 'cls': 'items', 'name': '新物品' },
"enemys": {
// --------------------------- 【怪物】相关的表格配置 --------------------------- //
"enemys": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"name": { "name": {
@ -196,8 +201,10 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
} }
}, },
"enemys_template": { 'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0 }, "enemys_template": { 'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0 },
"maps": {
// --------------------------- 【图块属性】相关的表格配置 --------------------------- //
"maps": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"id": { "id": {
@ -276,12 +283,13 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
} }
} }
}, },
"floors": {
// --------------------------- 【楼层属性】相关的表格配置 --------------------------- //
"floors": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"floor": { "floor": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"floorId": { "floorId": {
@ -413,7 +421,6 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
} }
}, },
"loc": { "loc": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"events": { "events": {

View File

@ -1,10 +1,13 @@
var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = /*
{ * 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括全塔属性的配置项
*/
var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object", "_type": "object",
"_data": { "_data": {
"main": { "main": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"floorIds": { "floorIds": {
@ -130,7 +133,6 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
} }
}, },
"firstData": { "firstData": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"title": { "title": {
@ -162,7 +164,6 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_data": "初始楼层的ID" "_data": "初始楼层的ID"
}, },
"hero": { "hero": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"name": { "name": {
@ -229,7 +230,6 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_data": "初始装上的装备,此处建议请直接留空数组" "_data": "初始装上的装备,此处建议请直接留空数组"
}, },
"items": { "items": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"keys": { "keys": {
@ -259,7 +259,6 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
} }
}, },
"loc": { "loc": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"direction": { "direction": {
@ -331,7 +330,6 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
} }
}, },
"values": { "values": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"lavaDamage": { "lavaDamage": {
@ -422,7 +420,6 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
} }
}, },
"flags": { "flags": {
"_type": "object", "_type": "object",
"_data": { "_data": {
"enableFloor": { "enableFloor": {

View File

@ -138,6 +138,7 @@ editor_multi = function () {
} }
if (editor_multi.id === 'importFile') { if (editor_multi.id === 'importFile') {
_format();
editor_multi.id = ''; editor_multi.id = '';
editor_multi.writeFileDone(); editor_multi.writeFileDone();
return; return;
@ -210,7 +211,10 @@ editor_multi = function () {
editor_multi.writeFileDone = function () { editor_multi.writeFileDone = function () {
fs.writeFile(_fileValues[0], editor.util.encode64(codeEditor.getValue() || ''), 'base64', function (err, data) { fs.writeFile(_fileValues[0], editor.util.encode64(codeEditor.getValue() || ''), 'base64', function (err, data) {
if (err) printe('文件写入失败,请手动粘贴至' + _fileValues[0] + '\n' + err); if (err) printe('文件写入失败,请手动粘贴至' + _fileValues[0] + '\n' + err);
else editor_multi.hide(); else {
editor_multi.hide();
printf(_fileValues[0] + " 写入成功F5刷新后生效");
}
}); });
} }

View File

@ -121,7 +121,7 @@ editor_table_wrapper = function (editor) {
// 事实上能执行到这一步工程没崩掉打不开,就继续吧.. // 事实上能执行到这一步工程没崩掉打不开,就继续吧..
if (keysForTableOrder[ii] === voidMark) { if (keysForTableOrder[ii] === voidMark) {
if (typeof id_815975ad_ee6f_4684_aac7_397b7e392702 === "undefined") { if (typeof id_815975ad_ee6f_4684_aac7_397b7e392702 === "undefined") {
alert('comment和data不匹配,请在群 HTML5造塔技术交流群 959329661 内反馈') // alert('comment和data不匹配,请在群 HTML5造塔技术交流群 959329661 内反馈')
console.error('comment和data不匹配,请在群 HTML5造塔技术交流群 959329661 内反馈') console.error('comment和data不匹配,请在群 HTML5造塔技术交流群 959329661 内反馈')
id_815975ad_ee6f_4684_aac7_397b7e392702 = 1; id_815975ad_ee6f_4684_aac7_397b7e392702 = 1;
} }

View File

@ -1,10 +1,13 @@
var events_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = /*
{ * 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括公共事件
*/
var events_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object", "_type": "object",
"_data": { "_data": {
"commonEvent": { "commonEvent": {
"_type": "object", "_type": "object",
"_data": function (key) { "_data": function (key) {
var obj = { var obj = {

View File

@ -1,6 +1,10 @@
var functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = /*
{ * 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括脚本编辑
*/
var functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object", "_type": "object",
"_data": { "_data": {
"events": { "events": {

View File

@ -1,5 +1,10 @@
var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = /*
{ * 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括插件编写
*/
var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object", "_type": "object",
"_data": function (key) { "_data": function (key) {
var obj = { var obj = {

View File

@ -359,6 +359,8 @@ enemys.prototype._getCurrentEnemys_sort = function (enemys) {
}); });
} }
enemys.prototype.hasEnemyLeft = function (floorId) { enemys.prototype.hasEnemyLeft = function (enemyId, floorId) {
return core.getCurrentEnemys(floorId).length > 0; return core.getCurrentEnemys(floorId).filter(function (enemy) {
return enemyId == null || enemy.id == enemyId;
}).length > 0;
} }