Openings between rooms
This commit is contained in:
@@ -48,6 +48,14 @@ func is_passable(from: Vector2i, to: Vector2i) -> bool:
|
||||
return _opening_set.has(_edge_key(from, to))
|
||||
|
||||
|
||||
func get_openings() -> Array:
|
||||
## Returns an array of [Vector2i, Vector2i] pairs representing opening edges.
|
||||
var result: Array = []
|
||||
for i in range(0, openings.size(), 2):
|
||||
result.append([openings[i], openings[i + 1]])
|
||||
return result
|
||||
|
||||
|
||||
func get_walls() -> Array:
|
||||
## Returns an array of [Vector2i, Vector2i] pairs representing wall edges.
|
||||
## A wall exists where a room tile borders void or a different room (without an opening).
|
||||
|
||||
Reference in New Issue
Block a user