16 lines
310 B
JavaScript
16 lines
310 B
JavaScript
const layer0 = ecs.get(1).TileLayers.layer(0)
|
|
const layer1 = ecs.get(1).TileLayers.layer(1)
|
|
|
|
const filtered = []
|
|
|
|
for (const position of projected) {
|
|
if (
|
|
[1, 2, 3, 4, 6].includes(layer0.tile(position))
|
|
&& ![7].includes(layer1.tile(position))
|
|
) {
|
|
filtered.push(position)
|
|
}
|
|
}
|
|
|
|
return filtered
|