Exemple #1
0
    private void CollapseBrokenConnections(GridTile ofTile)
    {
        foreach (Connection connection in ofTile.GetConnections())
        {
            if (connection == null)
            {
                continue;
            }

            if (connection.IsPassable())
            {
                connection.BuildConnectionFrom(ofTile);
            }
            else
            {
                connection.CollapseConnection();
            }
        }
    }