public static IEnumerable <Transform> GetPointsForCategory(SpawnPointCategory category) { return(NetworkManager.startPositions.Select(x => x.transform) .Where(x => x.TryGetComponent <SpawnPoint>(out var spawn) && spawn.category == category && spawn.used == false)); }
public static IEnumerable <Transform> GetPointsForCategory(SpawnPointCategory category) { return(NetworkManager.startPositions.Select(x => x.transform) .Where(x => x.GetComponent <SpawnPoint>().category == category)); }