Skip to content

Commit 9a731cb

Browse files
authoredJun 14, 2021
Add files via upload
1 parent d7b3952 commit 9a731cb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎scripts/levels.js

+12
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ class Levels {
5151
return tiles;
5252
}
5353

54+
getFloorsForPoint(point){
55+
let cPoint = {center:{x:point.x,y:point.y}}
56+
return findRoomsTiles(cPoint, this.levelsTiles)
57+
}
58+
59+
findCurrentFloorForElevation(elevation,floors){
60+
floors.forEach((floor)=>{
61+
if(elevation<=floor.range[1] && elevation >= floor.range[0]) return floor.range
62+
})
63+
return false
64+
}
65+
5466
findAllTiles() {
5567
let tiles = [];
5668
for (let tile of canvas.foreground.placeables) {

0 commit comments

Comments
 (0)