public static IObservable <Unit> SetUpStrongholdInLevelData(Coordinate coordinate, ILevelDataEditingService levelDataEditingService, IMapConfigRepository mapConfigRepository, ILevelDataRepository levelDataRepository) => levelDataRepository.GetMostRecent() .Zip(mapConfigRepository.GetMostRecent(), (data, config) => (data, config)) .SelectMany(tuple => levelDataEditingService.SetUpStronghold(tuple.data, tuple.config, coordinate));
protected override IObservable <ImmutableArray <UnitData> > GetDatasFromRepository(ILevelDataRepository levelDataRepository) { return(levelDataRepository.GetMostRecent().Select(d => d.UnitDatas.ToImmutableArray())); }
protected override IObservable <IReadOnlyList <GameObjectFactory> > GetGameObjectProvidersFromRepository( ILevelDataRepository levelDataRepository) { return(levelDataRepository.GetMostRecent().Select(d => d.StrongholdUnitGameObjectFactories)); }