OndrejNepozitek / Edgar-Unity

Unity Procedural Level Generator
https://ondrejnepozitek.github.io/Edgar-Unity/docs/introduction
MIT License
817 stars 70 forks source link

How to get the door position? #76

Closed longtran2904 closed 4 years ago

longtran2904 commented 4 years ago

In my game, all doors are locked and filled with tiles. If a door is connected to some room then I want to destroy all the tiles in front of it to make way. My first idea is to get the door position, and then loop through all the tiles of the "wall" tilemap in front of (or behind) it and remove them. How to get the door position of a room.? If a door is not connected to any room then the connectedRoom will be null right?

longtran2904 commented 4 years ago

Ok, so I figured it out. There was a property called DoorLine, just used its From and To property.