private static List <Element> CreateCorals(Segment segment, int divisions, MySimpleTerrain floor) { var corals = segment.GenerateElements(divisions / 2, SpawnRate.Of(1, 100), CoralFactory.Instance) .ToList(); corals.ForEach(coral => coral.yPosition(floor)); return(corals); }
private static List <Element> CreateFishes(List <Segment> segments, int divisions) { return(segments.SelectMany(segment => segment.GenerateElements(divisions / 2, SpawnRate.Of(1, 1200), FishFactory.Instance)).ToList()); }
private static IEnumerable <Element> GenerateElementsBySegment(Segment segment, int divisions) { return(segment.GenerateElements(divisions / 2, SpawnRate.Of(1, 1000), FishFactory.Instance)); }