修改钥匙的文本描述
增加横屏旋转、竖屏时强制进行提示 修改获得道具时的文本效果
This commit is contained in:
parent
948d624174
commit
36fa412494
@ -3,19 +3,19 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"yellowKey": {
|
"yellowKey": {
|
||||||
"cls": "tools",
|
"cls": "tools",
|
||||||
"name": "黄钥匙",
|
"name": "黄钥匙",
|
||||||
"text": "可以打开一扇黄门",
|
"text": "用来开黄色的门",
|
||||||
"hideInToolbox": true
|
"hideInToolbox": true
|
||||||
},
|
},
|
||||||
"blueKey": {
|
"blueKey": {
|
||||||
"cls": "tools",
|
"cls": "tools",
|
||||||
"name": "蓝钥匙",
|
"name": "蓝钥匙",
|
||||||
"text": "可以打开一扇蓝门",
|
"text": "用来开蓝色的门",
|
||||||
"hideInToolbox": true
|
"hideInToolbox": true
|
||||||
},
|
},
|
||||||
"redKey": {
|
"redKey": {
|
||||||
"cls": "tools",
|
"cls": "tools",
|
||||||
"name": "红钥匙",
|
"name": "红钥匙",
|
||||||
"text": "可以打开一扇红门",
|
"text": "用来开红色的门",
|
||||||
"hideInToolbox": true
|
"hideInToolbox": true
|
||||||
},
|
},
|
||||||
"redGem": {
|
"redGem": {
|
||||||
|
@ -4,6 +4,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
this._afterLoadResources = function () {
|
this._afterLoadResources = function () {
|
||||||
// 本函数将在所有资源加载完毕后,游戏开启前被执行
|
// 本函数将在所有资源加载完毕后,游戏开启前被执行
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
window.screen.orientation.lock("landscape-primary");
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
core.control.hideStatusBar();
|
core.control.hideStatusBar();
|
||||||
core.control.resize = function () {
|
core.control.resize = function () {
|
||||||
if (main.mode == 'editor') return;
|
if (main.mode == 'editor') return;
|
||||||
@ -15,9 +19,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
|
|
||||||
var horizontalMaxRatio = (clientHeight - 2 * BORDER - (extendToolbar ? BORDER : 0)) / (core._PY_ + (extendToolbar ? 38 : 0));
|
var horizontalMaxRatio = (clientHeight - 2 * BORDER - (extendToolbar ? BORDER : 0)) / (core._PY_ + (extendToolbar ? 38 : 0));
|
||||||
|
|
||||||
if (clientWidth - 3 * BORDER >= core._PX_ + BAR_WIDTH || (clientWidth > clientHeight && horizontalMaxRatio < 1)) {
|
|
||||||
// 横屏
|
// 横屏
|
||||||
core.domStyle.isVertical = false;
|
|
||||||
|
|
||||||
core.domStyle.availableScale = [];
|
core.domStyle.availableScale = [];
|
||||||
[1, 1.25, 1.5, 1.75, 2, 2.25, 2.5].forEach(function (v) {
|
[1, 1.25, 1.5, 1.75, 2, 2.25, 2.5].forEach(function (v) {
|
||||||
@ -28,13 +32,26 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
if (core.domStyle.availableScale.indexOf(core.domStyle.scale) < 0) {
|
if (core.domStyle.availableScale.indexOf(core.domStyle.scale) < 0) {
|
||||||
core.domStyle.scale = Math.min(1, horizontalMaxRatio);
|
core.domStyle.scale = Math.min(1, horizontalMaxRatio);
|
||||||
}
|
}
|
||||||
|
if (clientWidth - 3 * BORDER >= core._PX_ + BAR_WIDTH || (clientWidth > clientHeight && horizontalMaxRatio < 1)) {
|
||||||
|
core.domStyle.isVertical = false;
|
||||||
|
core.clearMap('Vertical');
|
||||||
} else {
|
} else {
|
||||||
// 竖屏
|
// 竖屏
|
||||||
core.domStyle.isVertical = true;
|
core.domStyle.isVertical = true;
|
||||||
core.domStyle.scale = Math.min((clientWidth - 2 * BORDER) / core._PX_);
|
core.createCanvas('Vertical', 0, 0, 480, 480, 200);
|
||||||
core.domStyle.availableScale = [];
|
core.drawWindowSkin('winskin.png', 'Vertical', 30, 150, 400, 100);
|
||||||
extendToolbar = false;
|
core.drawTextContent('Vertical', '\r[#ff8080]强烈建议建议使用最新版浏览器\n开启手机自动旋转功能进行横屏游戏', {
|
||||||
BAR_WIDTH = Math.round(core._PX_ * 0.3);
|
left: 50,
|
||||||
|
top: 180,
|
||||||
|
maxWidth: 400,
|
||||||
|
fontSize: 20,
|
||||||
|
lineHeight: 20,
|
||||||
|
bold: true,
|
||||||
|
});
|
||||||
|
// core.domStyle.scale = Math.min((clientWidth - 2 * BORDER) / core._PX_);
|
||||||
|
// core.domStyle.availableScale = [];
|
||||||
|
// extendToolbar = false;
|
||||||
|
// BAR_WIDTH = Math.round(core._PX_ * 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
var statusDisplayArr = this._shouldDisplayStatus(),
|
var statusDisplayArr = this._shouldDisplayStatus(),
|
||||||
@ -516,11 +533,14 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
hint = core.replaceText(hint);
|
hint = core.replaceText(hint);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
if (!core.status.event.id || core.status.event.id == 'action') {
|
if (!core.status.event.id || core.status.event.id == 'action') {
|
||||||
core.insertAction("\t[" + core.material.items[id].name + "," + id + "]\b[center]" + hint + "\n" +
|
//core.insertAction("\t[" + core.material.items[id].name + "," + id + "]\b[center]" + hint + "\n"
|
||||||
(id.endsWith('Key') ? "(钥匙类道具,遇到对应的门时自动打开)" :
|
//+
|
||||||
itemCls == 'tools' ? "(消耗类道具,请按T在道具栏使用)" :
|
// (id.endsWith('Key') ? "(钥匙类道具,遇到对应的门时自动打开)" :
|
||||||
itemCls == 'constants' ? "(永久类道具,请按T在道具栏使用)" :
|
// itemCls == 'tools' ? "(消耗类道具,请按T在道具栏使用)" :
|
||||||
itemCls == 'equips' ? "(装备类道具,请按Q在装备栏进行装备)" : ""));
|
// itemCls == 'constants' ? "(永久类道具,请按T在道具栏使用)" :
|
||||||
|
// itemCls == 'equips' ? "(装备类道具,请按Q在装备栏进行装备)" : ""));
|
||||||
|
core.insertAction("\b[center]\\c[32]\\i[" + id + "]\\c[22]" + core.material.items[id].name + '\n\n' + hint + "\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
itemHint.push(id);
|
itemHint.push(id);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user