Deploying to gh-pages from @ c4e0b706f9 🚀

This commit is contained in:
unanmed 2023-02-28 11:42:12 +00:00
parent b08531ce72
commit 350603e640
4 changed files with 4 additions and 69 deletions

View File

@ -286,7 +286,6 @@ core.prototype.init = function (coreData, callback) {
this._init_flags();
this._init_platform();
this._init_others();
this._init_plugins();
var b = main.mode == 'editor';
// 初始化画布
for (var name in core.canvas) {
@ -589,51 +588,6 @@ core.prototype._afterLoadResources = function (callback) {
if (callback) callback();
};
core.prototype._init_plugins = function () {
core.plugin = new (function () {})();
for (var name in plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1) {
if (
plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1[name] instanceof
Function
) {
try {
plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1[name].apply(
core.plugin
);
} catch (e) {
console.error(e);
console.error('无法初始化插件' + name);
}
}
}
if (!main.pluginUseCompress) {
(async function () {
const pluginList = main.plugin;
for await (const one of pluginList) {
const script = document.createElement('script');
script.src = `project/plugin/${one}.js`;
document.body.appendChild(script);
await new Promise(res => {
script.addEventListener('load', res);
});
}
})();
} else {
const script = document.createElement('script');
script.src = `project/plugin.min.js`;
document.body.appendChild(script);
}
core._forwardFunc('plugin');
if (!main.replayChecking && main.mode === 'play') {
main.forward();
core.resetSettings();
core.plugin.showMarkedEnemy.value = true;
}
};
core.prototype._forwardFuncs = function () {
for (var i = 0; i < main.loadList.length; ++i) {
var name = main.loadList[i];

File diff suppressed because one or more lines are too long

View File

@ -1958,7 +1958,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
try {
eval(core.floors[core.status.floorId].parallelDo);
} catch (e) {
main.log(e);
console.error(e);
}
}
}

View File

@ -1,28 +1,8 @@
///<reference path="../../src/types/core.d.ts" />
var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
init: function () {
// 这看不到插件插件全放到plugin文件夹里面了要看的话去 关于游戏 的开源地址里面看
// 直接把仓库clone下来或者下载zip都行
// 脚本编辑同理
this._afterLoadResources = function () {};
},
pluginUtils: function () {
// 保留这个函数以保证main.js能够使用
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();
}
};
}
};