Add enemy.id

This commit is contained in:
ckcz123 2018-11-20 14:38:45 +08:00
parent a04d377d5e
commit 8c42c0956a
3 changed files with 7 additions and 0 deletions

View File

@ -203,6 +203,11 @@ core.prototype.init = function (coreData, callback) {
document.getElementById("startLogo").innerHTML = core.firstData.title;
core.material.items = core.clone(core.items.getItems());
core.material.enemys = core.clone(core.enemys.getEnemys());
if (main.mode == 'play') {
for (var enemyId in core.material.enemys) {
core.material.enemys[enemyId].id = enemyId;
}
}
core.material.icons = core.icons.getIcons();
core.material.events = core.events.getEvents();

View File

@ -466,6 +466,7 @@ maps.prototype.drawMap = function (mapName, callback) {
}
}
images.forEach(function (t) {
if (typeof t == 'string') t = [0,0,t];
var dx=parseInt(t[0]), dy=parseInt(t[1]), p=t[2];
if (core.isset(dx) && core.isset(dy) &&
!core.hasFlag("floorimg_"+mapName+"_"+dx+"_"+dy) &&

View File

@ -2124,6 +2124,7 @@ ui.prototype.drawThumbnail = function(floorId, canvas, blocks, x, y, size, cente
}
}
images.forEach(function (t) {
if (typeof t == 'string') t = [0,0,t];
var dx=parseInt(t[0]), dy=parseInt(t[1]), p=t[2];
if (core.isset(dx) && core.isset(dy) &&
!core.hasFlag("floorimg_"+floorId+"_"+dx+"_"+dy) &&