public override VehicleNode MakeNode(IntVector pos, PathCategory category) { switch (category) { case PathCategory.Rail: return new RailNode(pos); case PathCategory.Road: return new RoadNode(pos); default: return new RoadNode(pos); } }
public static Transform GetSpawnPoint(PathCategory category) { switch (category) { case PathCategory.Client: return(spawnPoints[0]); case PathCategory.Network: return(spawnPoints[1]); case PathCategory.Server: return(spawnPoints[2]); default: throw new ArgumentOutOfRangeException("category", category, "Path category doesn't exist."); } }