public ConstructInspectorViewModel(IDataGetRepository <IInspectable> currentInspectableGetRepository, IMapGetService mapGetService, IMapEditingService mapEditingService) { ConstructDataLiveData = new LiveData <ConstructData>(); VisibilityLiveData = new LiveData <bool>(); _disposable = new CompositeDisposable { currentInspectableGetRepository.GetObservableStream() .SubscribeOn(NoobSchedulers.ThreadPool) .ObserveOn(NoobSchedulers.MainThread) .Subscribe(OnInspectableUpdate), mapGetService.GetObservableStream() .SubscribeOn(NoobSchedulers.ThreadPool) .ObserveOn(NoobSchedulers.MainThread) .Subscribe(OnNewMapCreated), mapEditingService.ModifiedEventStream .SubscribeOn(NoobSchedulers.ThreadPool) .ObserveOn(NoobSchedulers.MainThread) .Subscribe(_ => OnMapEdited()) }; }
public StrongholdInspectorViewModel(IDataGetRepository <IInspectable> currentInspectableGetRepository, IMapGetService mapGetService, ILevelEditingService levelEditingService, IInGameMessageService inGameMessageService, IMapEditingService mapEditingService) { _levelEditingService = levelEditingService; _inGameMessageService = inGameMessageService; StrongholdDataLiveData = new LiveData <StrongholdData>(); VisibilityLiveData = new LiveData <bool>(); _disposable = new CompositeDisposable { currentInspectableGetRepository.GetObservableStream() .SubscribeOn(NoobSchedulers.ThreadPool) .ObserveOn(NoobSchedulers.MainThread) .Subscribe(OnInspectableUpdate), mapGetService.GetObservableStream() .SubscribeOn(NoobSchedulers.ThreadPool) .ObserveOn(NoobSchedulers.MainThread) .Subscribe(OnNewMapCreated), mapEditingService.ModifiedEventStream .SubscribeOn(NoobSchedulers.ThreadPool) .ObserveOn(NoobSchedulers.MainThread) .Subscribe(_ => OnMapModified()) }; }
public SetUpStrongholdInMapCommand(IMapEditingService mapEditingService, IMapGetService mapGetService, Coordinate coordinate) { _mapEditingService = mapEditingService; _mapGetService = mapGetService; _coordinate = coordinate; }
public static IObservable<Unit> DestructStrongholdInMap(Coordinate coordinate, IMapEditingService mapEditingService, IMapGetService mapGetService) { return mapGetService.GetMostRecent() .SelectMany( m => mapEditingService.DestructStronghold(m, coordinate) ); }
public DestructStrongholdInLevelCommand(ILevelDataEditingService levelDataEditingService, IMapEditingService mapEditingService, IMapConfigRepository mapConfigRepository, IMapGetService mapGetService, ILevelDataRepository levelDataRepository, Coordinate coordinate) { _levelDataEditingService = levelDataEditingService; _mapEditingService = mapEditingService; _mapConfigRepository = mapConfigRepository; _mapGetService = mapGetService; _levelDataRepository = levelDataRepository; _coordinate = coordinate; }
public LevelEditingService(ILevelDataEditingService levelDataEditingService, IMapEditingService mapEditingService, IMapConfigRepository mapConfigRepository, IMapGetService mapGetService, ILevelDataRepository levelDataRepository, ICommandExecutionService commandExecutionService) { _levelDataEditingService = levelDataEditingService; _mapEditingService = mapEditingService; _mapConfigRepository = mapConfigRepository; _mapGetService = mapGetService; _levelDataRepository = levelDataRepository; _commandExecutionService = commandExecutionService; }