public Entity ReplaceUIFactoryService(IUIFactoryService newService) { var component = CreateComponent<UIFactoryServiceComponent>(ComponentIds.UIFactoryService); component.service = newService; ReplaceComponent(ComponentIds.UIFactoryService, component); return this; }
void createCanvasAndTouchBlocker(IUIFactoryService uiFactoryService) { canvas = uiFactoryService.CreatePrefab(CANVAS_PREFAB_PATH).GetComponent<Canvas>(); touchBlocker = uiFactoryService.CreatePrefab(TOUCHBLOCKER_PREFAB_PATH); touchBlocker.transform.SetParent(uiFactoryService.CreatePrefab(CANVAS_PREFAB_PATH).transform, false); // new canvas cause unity says fu }
public ViewService(EventService eventService, IUIFactoryService uiFactoryService) { factory = new ViewFactory(); createCanvasAndTouchBlocker(uiFactoryService); addViewShowHiddenListeners(eventService); }
void createInfoGameObject(IViewService viewService, IUIFactoryService uiFactoryService) { infoGo = uiFactoryService.CreatePrefab("EditorView/InfoText"); infoGo.transform.SetParent(viewService.Canvas.transform, false); infoGo.SetActive(false); }
public InfoService(IViewService viewService, IUIFactoryService uiFactoryService, EventService eventService) { createInfoGameObject(viewService, uiFactoryService); addListener(eventService); }
public void SetBaseServices(IUIFactoryService uiFactoryService, EventService eventService, ITranslationService translationService) { this.uiFactoryService = uiFactoryService; this.eventService = eventService; this.translationService = translationService; }
public Entity AddUIFactoryService(IUIFactoryService newService) { var component = CreateComponent<UIFactoryServiceComponent>(ComponentIds.UIFactoryService); component.service = newService; return AddComponent(ComponentIds.UIFactoryService, component); }
private void createServices() { timeService = new TimeService(); eventService = new EventService(); uiFactoryService = new UIFactoryService(); wwwService = new FakeWwwService();//controller.GameObject.AddComponent<WwwService>(); viewService = new ViewService(eventService, uiFactoryService); loadService = new LoadService(eventService); gameService = new GameService(pool, viewService); pathService = new PathService(pool, wwwService, eventService); levelService = new LevelService(wwwService, eventService); enemyService = new EnemyService(pool, wwwService, eventService); bonusService = new BonusService(pool, wwwService, eventService); difficultyService = new DifficultyService(pool, wwwService, eventService); infoService = new InfoService(viewService, uiFactoryService, eventService); settingsService = new SettingsService(pool); translationService = new TranslationService(settingsService); languageService = new LanguageService(wwwService, eventService); analyticsService = new AnalyticsService(settingsService); shipService = new ShipService(timeService, eventService); gamerService = new GamerService(eventService); currencyService = new CurrencyService(eventService, gamerService); iapService = new IAPService(eventService); adService = new AdService(currencyService); shopService = new ShopService(currencyService, eventService, iapService); updateables.Add(infoService); }