如何在过滤器中使用两个参数?
var source3 = Game.spawns.Spawn1.pos.findClosest(Game.SOURCES_ACTIVE, {
filter: function(object) {
return object.id != source1 && source2;
}
}).id;
因为我的过滤器只考虑参数'source1'......
如何在过滤器中使用两个参数?
var source3 = Game.spawns.Spawn1.pos.findClosest(Game.SOURCES_ACTIVE, {
filter: function(object) {
return object.id != source1 && source2;
}
}).id;
因为我的过滤器只考虑参数'source1'......