2022-11-19 13:07:42 +08:00
|
|
|
|
///<reference path="../../src/types/core.d.ts" />
|
|
|
|
|
|
2022-11-13 18:02:05 +08:00
|
|
|
|
var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
|
2022-11-14 17:11:23 +08:00
|
|
|
|
init: function () {
|
2023-02-28 17:49:34 +08:00
|
|
|
|
// 这看不到插件,插件全放到plugin文件夹里面了,要看的话去 关于游戏 的开源地址里面看
|
|
|
|
|
// 直接把仓库clone下来,或者下载zip都行
|
|
|
|
|
// 脚本编辑同理
|
2023-02-26 16:35:48 +08:00
|
|
|
|
this._afterLoadResources = function () {};
|
2022-11-13 18:02:05 +08:00
|
|
|
|
},
|
2023-01-09 23:50:28 +08:00
|
|
|
|
pluginUtils: function () {
|
2023-02-28 17:49:34 +08:00
|
|
|
|
// 保留这个函数,以保证main.js能够使用
|
2023-02-22 21:39:44 +08:00
|
|
|
|
this.maxGameScale = function (n = 0) {
|
|
|
|
|
const index = core.domStyle.availableScale.indexOf(
|
|
|
|
|
core.domStyle.scale
|
|
|
|
|
);
|
|
|
|
|
core.control.setDisplayScale(
|
|
|
|
|
core.domStyle.availableScale.length - 1 - index - n
|
|
|
|
|
);
|
|
|
|
|
if (!core.isPlaying() && core.flags.enableHDCanvas) {
|
|
|
|
|
core.domStyle.ratio = Math.max(
|
|
|
|
|
window.devicePixelRatio || 1,
|
|
|
|
|
core.domStyle.scale
|
|
|
|
|
);
|
|
|
|
|
core.resize();
|
|
|
|
|
}
|
|
|
|
|
};
|
2022-11-13 18:02:05 +08:00
|
|
|
|
}
|
2022-11-14 17:11:23 +08:00
|
|
|
|
};
|