Add enemy.id
This commit is contained in:
parent
a04d377d5e
commit
8c42c0956a
@ -203,6 +203,11 @@ core.prototype.init = function (coreData, callback) {
|
|||||||
document.getElementById("startLogo").innerHTML = core.firstData.title;
|
document.getElementById("startLogo").innerHTML = core.firstData.title;
|
||||||
core.material.items = core.clone(core.items.getItems());
|
core.material.items = core.clone(core.items.getItems());
|
||||||
core.material.enemys = core.clone(core.enemys.getEnemys());
|
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.icons = core.icons.getIcons();
|
||||||
core.material.events = core.events.getEvents();
|
core.material.events = core.events.getEvents();
|
||||||
|
|
||||||
|
|||||||
@ -466,6 +466,7 @@ maps.prototype.drawMap = function (mapName, callback) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
images.forEach(function (t) {
|
images.forEach(function (t) {
|
||||||
|
if (typeof t == 'string') t = [0,0,t];
|
||||||
var dx=parseInt(t[0]), dy=parseInt(t[1]), p=t[2];
|
var dx=parseInt(t[0]), dy=parseInt(t[1]), p=t[2];
|
||||||
if (core.isset(dx) && core.isset(dy) &&
|
if (core.isset(dx) && core.isset(dy) &&
|
||||||
!core.hasFlag("floorimg_"+mapName+"_"+dx+"_"+dy) &&
|
!core.hasFlag("floorimg_"+mapName+"_"+dx+"_"+dy) &&
|
||||||
|
|||||||
@ -2124,6 +2124,7 @@ ui.prototype.drawThumbnail = function(floorId, canvas, blocks, x, y, size, cente
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
images.forEach(function (t) {
|
images.forEach(function (t) {
|
||||||
|
if (typeof t == 'string') t = [0,0,t];
|
||||||
var dx=parseInt(t[0]), dy=parseInt(t[1]), p=t[2];
|
var dx=parseInt(t[0]), dy=parseInt(t[1]), p=t[2];
|
||||||
if (core.isset(dx) && core.isset(dy) &&
|
if (core.isset(dx) && core.isset(dy) &&
|
||||||
!core.hasFlag("floorimg_"+floorId+"_"+dx+"_"+dy) &&
|
!core.hasFlag("floorimg_"+floorId+"_"+dx+"_"+dy) &&
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user