mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-03 10:14:34 +08:00
修复图片加载bug
This commit is contained in:
1 parent
3bdb668c5f
commit
c25f0d7c15
7 files changed
+39
-9
No files matched your search
@@ -672,11 +672,17 @@ export function calDamageWith(
|
||||
return damage;
|
||||
}
|
||||
|
||||
export function initFloorDamage(floorId: FloorIds) {
|
||||
const floor = core.status.maps[floorId];
|
||||
floor.enemy = new EnemyCollection(floorId);
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface PluginDeclaration {
|
||||
damage: {
|
||||
Enemy: typeof DamageEnemy;
|
||||
Collection: typeof EnemyCollection;
|
||||
initFloorDamage: typeof initFloorDamage;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -687,5 +693,6 @@ declare global {
|
||||
|
||||
core.plugin.damage = {
|
||||
Enemy: DamageEnemy,
|
||||
Collection: EnemyCollection
|
||||
Collection: EnemyCollection,
|
||||
initFloorDamage
|
||||
};
|
||||
@@ -101,7 +101,7 @@ if (main.mode == 'editor') {
|
||||
parent.appendChild(input2);
|
||||
}
|
||||
}
|
||||
core.maps._loadFloor_doNotCopy = function () {
|
||||
maps.prototype._loadFloor_doNotCopy = function () {
|
||||
return [
|
||||
'firstArrive',
|
||||
'eachArrive',
|
||||
@@ -121,7 +121,7 @@ core.maps._loadFloor_doNotCopy = function () {
|
||||
];
|
||||
};
|
||||
////// 绘制背景和前景层 //////
|
||||
core.maps._drawBg_draw = function (floorId, toDrawCtx, cacheCtx, config) {
|
||||
maps.prototype._drawBg_draw = function (floorId, toDrawCtx, cacheCtx, config) {
|
||||
config.ctx = cacheCtx;
|
||||
core.maps._drawBg_drawBackground(floorId, config);
|
||||
// ------ 调整这两行的顺序来控制是先绘制贴图还是先绘制背景图块;后绘制的覆盖先绘制的。
|
||||
@@ -154,7 +154,7 @@ core.maps._drawBg_draw = function (floorId, toDrawCtx, cacheCtx, config) {
|
||||
);
|
||||
config.ctx = toDrawCtx;
|
||||
};
|
||||
core.maps._drawFg_draw = function (floorId, toDrawCtx, cacheCtx, config) {
|
||||
maps.prototype._drawFg_draw = function (floorId, toDrawCtx, cacheCtx, config) {
|
||||
config.ctx = cacheCtx;
|
||||
// ------ 调整这两行的顺序来控制是先绘制贴图还是先绘制前景图块;后绘制的覆盖先绘制的。
|
||||
core.maps._drawFloorImages(
|
||||
@@ -187,7 +187,7 @@ core.maps._drawFg_draw = function (floorId, toDrawCtx, cacheCtx, config) {
|
||||
config.ctx = toDrawCtx;
|
||||
};
|
||||
////// 移动判定 //////
|
||||
core.maps._generateMovableArray_arrays = function (floorId) {
|
||||
maps.prototype._generateMovableArray_arrays = function (floorId) {
|
||||
return {
|
||||
bgArray: this.getBgMapArray(floorId),
|
||||
fgArray: this.getFgMapArray(floorId),
|
||||
|
||||
Reference in new issue
Block a user