Deploying to gh-pages from @ bd4a7f946a 🚀

This commit is contained in:
unanmed committed 2023-04-25 12:52:34 +00:00
1 parent 1c165f7d0d
commit d0a6f4076f
8 files changed
+67 -47

No files matched your search

+23 -2
View File
@@ -310,17 +310,38 @@ core.prototype.init = async function (coreData, callback) {
});
};
core.prototype.initSync = function (coreData, callback) {
this._forwardFuncs();
for (var key in coreData) core[key] = coreData[key];
this._init_flags();
this._init_platform();
this._init_others();
this._loadPluginSync();
core.loader._load(function () {
core.extensions._load(function () {
core._afterLoadResources(callback);
});
});
};
core.prototype._loadPluginSync = function () {
core.plugin = {};
if (main.useCompress) main.loadMod('project', 'plugin', () => 0);
else main.loadMod('project', 'plugin.min', () => 0);
};
core.prototype._loadPlugin = async function () {
const mainData = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main;
core.plugin = {};
// 加载插件
if (!main.replayChecking && main.mode === 'play') {
if (main.mode === 'play') {
main.forward();
core.resetSettings();
core.plugin.showMarkedEnemy.value = true;
}
if (main.pluginUseCompress) {
await main.loadScript(`project/plugin.m.js?v=${main.version}`);
await main.loadScript(`project/plugin.min.js?v=${main.version}`);
} else {
await main.loadScript(
`project/plugin/index.js?v=${main.version}`,
+7 -3
View File
@@ -25,8 +25,10 @@ events.prototype.resetGame = function (hero, hard, floorId, maps, values) {
events.prototype.startGame = function (hard, seed, route, callback) {
hard = hard || '';
core.dom.gameGroup.style.display = 'block';
core.plugin.startOpened.value = false;
core.plugin.loaded.value = false;
if (!main.replayChecking) {
core.plugin.startOpened.value = false;
core.plugin.loaded.value = false;
}
if (main.mode != 'play') return;
core.plugin.skillTree.resetSkillLevel();
@@ -73,7 +75,9 @@ events.prototype._startGame_start = function (hard, seed, route, callback) {
core.events._startGame_afterStart(callback);
});
if (route != null) core.startReplay(route);
if (route != null) {
core.startReplay(route);
}
};
events.prototype._startGame_setHard = function () {
+2 -2
View File
@@ -3202,7 +3202,7 @@ maps.prototype.removeBlock = function (x, y, floorId) {
const block = blocks[i];
this.removeBlockByIndex(i, floorId);
this._removeBlockFromMap(floorId, block);
core.updateShadow(true);
if (!main.replayChecking) core.updateShadow(true);
return true;
}
return false;
@@ -3365,7 +3365,7 @@ maps.prototype.setBlock = function (number, x, y, floorId, noredraw) {
}
}
}
core.updateShadow(true);
if (!main.replayChecking) core.updateShadow(true);
};
maps.prototype.animateSetBlock = function (
+14 -35
View File
@@ -942,40 +942,19 @@ ui.prototype.clearUI = function () {
////// 左上角绘制一段提示 //////
ui.prototype.drawTip = function (text, id, frame) {
text = core.replaceText(text) || '';
var realText = this._getRealContent(text);
var one = {
text: text,
textX: 21,
width: 26 + core.calWidth('data', realText, '16px Arial'),
opacity: 0.1,
stage: 1,
frame: frame || 0,
time: 0
};
if (id != null) {
var info = core.getBlockInfo(id);
if (info == null || !info.image || info.bigImage) {
// 检查状态栏图标
if (core.statusBar.icons[id] instanceof Image) {
info = {
image: core.statusBar.icons[id],
posX: 0,
posY: 0,
height: 32
};
} else info = null;
}
if (info != null) {
one.image = info.image;
one.posX = info.posX;
one.posY = info.posY;
one.height = info.height;
one.textX += 24;
one.width += 24;
}
}
core.animateFrame.tip = one;
let t =
text +
' [' +
core.status.hero.loc.x +
',' +
core.status.hero.loc.y +
',' +
core.status.floorId +
'] ';
if (core.status.floorId === 'tower6')
t += core.searchBlockWithFilter(v => v.event.cls === 'enemys').length;
console.log(t);
};
ui.prototype._drawTip_drawOne = function (tip) {
@@ -4229,5 +4208,5 @@ ui.prototype.deleteAllCanvas = function () {
this.deleteCanvas(function () {
return true;
});
if (main.mode === 'play' && !core.isReplaying()) core.initShadowCanvas();
if (main.mode === 'play' && !main.replayChecking) core.initShadowCanvas();
};