protected override void Exec(ILoadingManager loading, Action <ILoadingCommand> onComplete) { m_AsyncOperation = SceneManager.LoadSceneAsync(m_Scene); m_AsyncOperation.completed += OnCompleted; void OnCompleted(AsyncOperation op) { op.completed -= OnCompleted; onComplete.Invoke(this); } }
protected override void Exec(ILoadingManager loading, Action <ILoadingCommand> onComplete) { Task.Run( () => { m_Tick = DateTime.Now.Ticks; Thread.Sleep(SLEEP); OnCompleted(); }); void OnCompleted() { onComplete.Invoke(this); } }
public LoadingViewManager(ILoadingView loadingView, ILoadingManager loadingManager) { this.loadingView = loadingView; this.loadingManager = loadingManager; }
protected abstract void Exec(ILoadingManager manager, Action <ILoadingCommand> onComplete);
void ILoadingCommand.Exec(ILoadingManager manager, Action <ILoadingCommand> onComplete) => Exec(manager, onComplete);
private void InjectionInitialize( ICharacterService characterService, IComicService comicService, ICreatorService creatorService, ISeriesService seriesService, IEventService eventService, ILoadingManager loadingManager, IScreenManager screenManager, IEventManager eventManager, IResultProcessor resultProcessor, IPlanetSystemSpawner planetSystemSpawner, SearchViewModel searchViewModel) { this.characterService = characterService; this.comicService = comicService; this.creatorService = creatorService; this.seriesService = seriesService; this.eventService = eventService; this.loadingManager = loadingManager; this.screenManager = screenManager; this.eventManager = eventManager; this.resultProcessor = resultProcessor; this.planetSystemSpawner = planetSystemSpawner; this.searchViewModel = searchViewModel; this.eventManager.GetEvent<LoadingEvent>().AddListener(this.OnLoading); }
private ISetOfSensors ReadData(string dataPath) { loadingManager = new ExcelLoadingManagerV2(dataPath); return(loadingManager.LoadSensors()); }
public LoadingScope(ILoadingManager loadingManager, Action completion) { this.loadingManager = loadingManager; this.loadingManager.BeginLoad(); this.completion = completion; }