Skip to content

Commit

Permalink
Change to use LayoutPack method
Browse files Browse the repository at this point in the history
  • Loading branch information
mpewsey committed Jun 11, 2024
1 parent 9eb67f8 commit 10acdbd
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Packages/ManiaMap.Unity/Scripts/Runtime/DoorComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,7 @@ private DoorConnection FindDoorConnection()
{
var roomId = Room.RoomLayout.Id;
var position = new Vector2DInt(Row, Column);

foreach (var connection in Room.LayoutPack.GetDoorConnections(roomId))
{
if (connection.ContainsDoor(roomId, position, Direction))
return connection;
}

return null;
return Room.LayoutPack.FindDoorConnection(roomId, position, Direction);
}

/// <summary>
Expand Down

0 comments on commit 10acdbd

Please sign in to comment.