Skip to content

Commit

Permalink
Added corners dir from __neighbours (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Jan 15, 2024
1 parent 0541130 commit 089d11a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/ldtk/Level.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package ldtk;

enum NeighbourDir {
NorthEastCorner;
NorthWestCorner;
SouthEastCorner;
SouthWestCorner;
North;
South;
West;
Expand Down Expand Up @@ -125,13 +129,20 @@ class Level {
neighbours.push({
levelIid: n.levelIid,
dir: switch n.dir {
case "nw": NorthWestCorner;
case "ne": NorthEastCorner;
case "sw": SouthWestCorner;
case "se": SouthEastCorner;

case "n": North;
case "s": South;
case "w": West;
case "e": East;

case "<": DepthBelow;
case ">": DepthAbove;
case "o": SameDepthOverlap;

case _: trace("WARNING: unknown neighbour level dir: "+n.dir); North;
},
});
Expand Down

0 comments on commit 089d11a

Please sign in to comment.