Esempio n. 1
0
 private void addListeners()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <TrayEvents.SelectTrayScreen>(onSelectTrayScreen);
     eventChannel.AddListener <TrayEvents.OpenTray>(onOpenTray);
     eventChannel.AddListener <TrayEvents.CloseTray>(onCloseTray);
 }
Esempio n. 2
0
 private void SubscribeToEvents()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <FishingEvents.UpdateFishingBaitUI>(onUpdateFishingBaitUI);
     eventChannel.AddListener <FishingEvents.SetTimeRemaining>(setTimeRemaining);
     eventChannel.AddListener <FishingEvents.SetFishingState>(onSetFishingState);
 }
        private bool onSaveClothingClicked(CustomizerUIEvents.ConfirmSaveClickedEvent evt)
        {
            bool flag = false;

            try
            {
                itemModel.CustomEquipmentModel = EquipmentNetworkUtils.GetModelFromCustomizerChildList(customizerChildren, currentTemplateDefition, decalDefinitionIds);
                flag = true;
            }
            catch (Exception ex)
            {
                Log.LogException(this, ex);
            }
            if (flag)
            {
                serviceEventChannel.AddListener <InventoryServiceEvents.EquipmentCreated>(onEquipmentCreated);
                serviceEventChannel.AddListener <InventoryServiceErrors.EquipmentCreationError>(onEquipmentCreationError);
                CustomEquipment equipmentRequest = CustomEquipmentResponseAdaptor.ConvertCustomEquipmentToRequest(itemModel.CustomEquipmentModel);
                Service.Get <INetworkServicesManager>().InventoryService.CreateCustomEquipment(equipmentRequest);
                logItemCreatedAnalytics();
            }
            else
            {
                CustomizationContext.EventBus.DispatchEvent(default(CustomizerUIEvents.SaveClothingItemError));
            }
            return(false);
        }
 public void Start()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <NetworkControllerEvents.RemotePlayerJoinedRoomEvent>(onRemotePlayerJoinedRoom, EventDispatcher.Priority.LAST);
     eventChannel.AddListener <NetworkControllerEvents.RemotePlayerLeftRoomEvent>(onRemotePlayerLeftRoom, EventDispatcher.Priority.LAST);
     updateUserCount();
 }
 private void setupMainEventChannelListeners()
 {
     mainEventChannel.AddListener <EditableItemEvents.ItemReady>(onItemReady);
     mainEventChannel.AddListener <EditableItemEvents.ActionButtonClicked>(onEditableItemActionButtonClicked);
     mainEventChannel.AddListener <InventoryServiceEvents.EquipmentDeleted>(onInventoryItemDeleted);
     mainEventChannel.AddListener <EditableItemEvents.ItemDisappeared>(onItemDisappeared);
 }
Esempio n. 6
0
 private void setupListeners()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <CatalogServiceEvents.ItemSubmissionCompleteEvent>(onItemSubmissionCompleteEvent);
     eventChannel.AddListener <CatalogServiceEvents.ItemSubmissionErrorEvent>(onItemsSubmissionErrorEvent);
     eventChannel.AddListener <CustomizerUIEvents.SubmitClothingItemError>(onSubmitClothingItemError);
 }
 public void Init(ClothingDesignerDependencies dependencies)
 {
     this.dependencies = dependencies;
     eventChannel      = new EventChannel(ClothingDesignerContext.EventBus);
     eventChannel.AddListener <ClothingDesignerUIEvents.CloseButton>(onCloseButton);
     eventChannel.AddListener <ClothingDesignerUIEvents.ChangeStateInventory>(onStateChangeInventory);
     eventChannel.AddListener <ClothingDesignerUIEvents.ChangeStateCustomizer>(onStateChangeCustomizer);
     eventChannel.AddListener <ClothingDesignerUIEvents.ShowCatalog>(onShowCatalog);
     eventChannel.AddListener <ClothingDesignerUIEvents.HideCatalog>(onHideCatalog);
     eventChannel.AddListener <ClothingDesignerUIEvents.CameraPositionChangeComplete>(onCameraTransitionComplete);
     eventChannel.AddListener <ClothingDesignerUIEvents.ShowMemberFlow>(onShowMemberFlow);
     eventChannel.AddListener <ClothingDesignerUIEvents.ShowSubmittedInCatalog>(onShowSubmittedInCatalog);
     customizerEventChannel = new EventChannel(CustomizationContext.EventBus);
     customizerEventChannel.AddListener <ClothingDesignerUIEvents.CustomizerEditingState>(onCustomizerEditState);
     customizerEventChannel.AddListener <ClothingDesignerUIEvents.CustomizerTemplateState>(onCustomizerTemplateState);
     customizerEventChannel.AddListener <CustomizerUIEvents.SelectTemplate>(onCustomizerTemplateSelected);
     inventoryEventChannel = new EventChannel(InventoryContext.EventBus);
     inventoryEventChannel.AddListener <ClothingDesignerUIEvents.ShowAllTemplates>(onShowAllTemplates);
     inventoryEventChannel.AddListener <ClothingDesignerUIEvents.ShowEquippedItems>(onShowEquippedItems);
     inventoryEventChannel.AddListener <ClothingDesignerUIEvents.ShowHiddenItems>(onShowHiddenItems);
     inventoryEventChannel.AddListener <ClothingDesignerUIEvents.CategoryChange>(onInventoryChangeCategory);
     catalogEventChannel = new EventChannel(CatalogContext.EventBus);
     catalogEventChannel.AddListener <CatalogUIEvents.AcceptChallengeClickedEvent>(onAcceptChallengeClickEvent);
     penguinLighting = GameObject.Find("Realtime Directional Light");
     hideCatalog();
     loadInventory();
     Service.Get <ICPSwrveService>().Action("view.my_style");
     showCatalogCustomizer = false;
 }
 private void Start()
 {
     eventChannel = new EventChannel(InventoryContext.EventBus);
     eventChannel.AddListener <InventoryUIEvents.StartedLoadingEquipment>(onStartLoadEquipment);
     eventChannel.AddListener <InventoryUIEvents.AllEquipmentLoaded>(onAllEquipmentLoaded);
     LoadingOverlay.SetActive(value: false);
 }
 public void Execute()
 {
     eventChannel.AddListener <IglooServiceEvents.IglooLayoutUpdated>(onLayoutUpdated);
     eventChannel.AddListener <IglooServiceEvents.IglooDataUpdated>(onDataUpdated);
     iglooService.UpdateIglooLayout(layoutId, sceneLayout, this);
     iglooService.UpdateIglooData(visibility, layoutId, this);
 }
 private void Start()
 {
     button          = GetComponentInParent <Button>();
     trayInputButton = button.GetComponent <TrayInputButton>();
     eventChannel    = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <FishingEvents.SetFishingState>(onSetFishingState);
     eventChannel.AddListener <FishingEvents.FishingGameplayStateChanged>(onFishingGameplayStateChanged);
 }
 private void Start()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <TubeRaceEvents.SetModifierLayout>(onSetModifierLayout);
     eventChannel.AddListener <TubeRaceEvents.RaceStart>(onRaceStart);
     eventChannel.AddListener <TubeRaceEvents.RaceEnd>(onRaceEnd);
     RaceTrigger.SetActive(value: false);
 }
Esempio n. 12
0
 private void OnEnable()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <PlayerStateServiceEvents.OnlinePlayerSwidListReceived>(onOnlinePlayerSwidListReceived);
     eventChannel.AddListener <PopupEvents.ShowTopPopup>(onTopPopupShown);
     removePooledScrollRectObservers();
     onEnable();
 }
Esempio n. 13
0
 private void setupClothingDesignerListeners()
 {
     clothingDesignerEventChannel = new EventChannel(ClothingDesignerContext.EventBus);
     clothingDesignerEventChannel.AddListener <ClothingDesignerUIEvents.ChangeStateInventory>(onSwitchToInventory);
     clothingDesignerEventChannel.AddListener <ClothingDesignerUIEvents.ChangeStateCustomizer>(onSwitchToCustomizer);
     clothingDesignerEventChannel.AddListener <ClothingDesignerUIEvents.EnableDragAreaControllerUpdates>(onEnableDragAreaControllerUpdates);
     clothingDesignerEventChannel.AddListener <ClothingDesignerUIEvents.DisableDragAreaControllerUpdates>(onDisableDragAreaControllerUpdates);
 }
 private void setupListeners()
 {
     eventChannel = new EventChannel(CustomizationContext.EventBus);
     eventChannel.AddListener <CustomizerActiveSwatchEvents.SetIsFabric>(onSetIsFabric);
     eventChannel.AddListener <CustomizerActiveSwatchEvents.SetIsVisible>(onSetVisible);
     eventChannel.AddListener <CustomizerActiveSwatchEvents.SetSwatch>(onSetSwatch);
     eventChannel.AddListener <CustomizerActiveSwatchEvents.SetIsInteractable>(onSetInteractable);
 }
Esempio n. 15
0
 private void OnEnable()
 {
     eventDispatcher = Service.Get <EventDispatcher>();
     eventChannel    = new EventChannel(eventDispatcher);
     eventChannel.AddListener <ChatServiceEvents.SendChatActivity>(onSendChatActivity);
     eventChannel.AddListener <ChatServiceEvents.SendChatActivityCancel>(onSendChatActivityCancel);
     eventChannel.AddListener <SendChatMessage>(onSendChatMessage, EventDispatcher.Priority.LAST);
 }
Esempio n. 16
0
 private void setupListeners()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <IglooMusicEvents.PreviewMusicTrack>(onPreviewMusicTrack);
     eventChannel.AddListener <IglooMusicEvents.SetMusicTrack>(onSetMusicTrack);
     eventChannel.AddListener <IglooMusicEvents.StopAllMusic>(onMuteAllMusic);
     eventChannel.AddListener <IglooMusicEvents.StopPreviewMusic>(onStopPreviewMusic);
 }
 protected override void awakeInit()
 {
     playerScoresDictionary = new Dictionary <long, List <GameObject> >();
     eventChannel           = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <PlayerSpawnedEvents.RemotePlayerSpawned>(onRemotePlayerSpawned);
     eventChannel.AddListener <PlayerScoreEvents.ShowPlayerScore>(onShowPlayerScore);
     eventChannel.AddListener <PlayerScoreEvents.RemovePlayerScore>(onRemovePlayerScore);
 }
 private void Start()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <TutorialUIEvents.ShowTooltip>(onShowTooltip);
     eventChannel.AddListener <TutorialUIEvents.HideTooltip>(onHideTooltip);
     Content.LoadAsync(onPrefabLoaded, tooltipContentKey);
     Content.LoadAsync(onTextPrefabLoaded, tooltipDefaultTextContentKey);
     FullScreenButton.SetActive(value: false);
 }
Esempio n. 19
0
 private void setupListeners()
 {
     eventChannel = new EventChannel(CustomizationContext.EventBus);
     eventChannel.AddListener <CustomizerWidgetEvents.ShowScaleAndRotateWidget>(onShowRotateScaleWidgets);
     eventChannel.AddListener <CustomizerWidgetEvents.HideScaleAndRotateWidget>(onHideRotateScaleWidgets);
     eventChannel.AddListener <CustomizerWidgetEvents.SetSliderWidgetValue>(onSetSliderWidgetValue);
     eventChannel.AddListener <CustomizerWidgetEvents.SetIsSliderWidgetInteractable>(onSetIsSliderWidgetInteractable);
     sliderWidget = SliderWidget;
 }
Esempio n. 20
0
 public void Start()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <CinematicSpeechEvents.ShowSpeechEvent>(onShowCinematicSpeech);
     eventChannel.AddListener <CinematicSpeechEvents.HideSpeechEvent>(onHideCinematicSpeech);
     eventChannel.AddListener <CinematicSpeechEvents.HideAllSpeechEvent>(onHideAllCinematicSpeech);
     eventChannel.AddListener <CinematicSpeechEvents.SpeechCompleteEvent>(onCinematicSpeechComplete);
     gameCamera = Camera.main;
 }
 private void setupListeners()
 {
     mainEventChannel = new EventChannel(Service.Get <EventDispatcher>());
     setupMainEventChannelListeners();
     eventChannel = new EventChannel(InventoryContext.EventBus);
     eventChannel.AddListener <InventoryModelEvents.DisplayedInventoryUpdated>(orderedInventoryUpdated);
     eventChannel.AddListener <InventoryUIEvents.EnableScrollRect>(onEnableScrollRect);
     eventChannel.AddListener <InventoryUIEvents.DisableScrollRect>(onDisableScrollRect);
 }
Esempio n. 22
0
 private void setupListeners()
 {
     eventChannel = new EventChannel(CustomizationContext.EventBus);
     eventChannel.AddListener <CustomizerEffectsEvents.FabricPlaced>(onFabricPlacedShowEffect);
     eventChannel.AddListener <CustomizerEffectsEvents.DecalPlaced>(onDecalPlacedShowEffect);
     eventChannel.AddListener <CustomizerEffectsEvents.ItemSaving>(onItemSavingShowEffect);
     eventChannel.AddListener <CustomizerEffectsEvents.ItemSaved>(onItemSavedShowEffect);
     eventChannel.AddListener <CustomizerUIEvents.EndPurchaseMoment>(onEndPurchaseMoment);
 }
 private void setupListeners()
 {
     customizationEventChannel = new EventChannel(CustomizationContext.EventBus);
     customizationEventChannel.AddListener <CustomizerUIEvents.StartPurchaseMoment>(onStartPurchaseMoment);
     customizationEventChannel.AddListener <CustomizerWidgetEvents.ShowCoinCountWidget>(onShowCoinCountWidget);
     customizationEventChannel.AddListener <CustomizerWidgetEvents.HideCoinCountWidget>(onHideCoinCountWidget);
     customizationEventChannel.AddListener <CustomizerWidgetEvents.ResetCoinCountWidgetCount>(onResetCoinCountWidgetCount);
     customizationEventChannel.AddListener <CustomizerWidgetEvents.RemoveCoinsFromWidget>(onRemoveCoinsAnimated);
 }
Esempio n. 24
0
 private void Start()
 {
     popupMap     = new Dictionary <string, TutorialPopup>();
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <TutorialUIEvents.ShowTutorialPopup>(onShowPopup);
     eventChannel.AddListener <TutorialUIEvents.ShowTutorialPopupAtPosition>(onShowPopupAtPosition);
     eventChannel.AddListener <TutorialUIEvents.HideTutorialPopup>(onHidePopup);
     eventChannel.AddListener <TutorialUIEvents.HideAllTutorialPopups>(onHideAllPopups);
 }
 private void setupEventListeners()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <SceneTransitionEvents.MusicTrackPrefabLoaded>(onMusicTrackPrefabLoaded);
     eventChannel.AddListener <IglooMusicEvents.PreviewMusicTrack>(onPreviewMusicTrack);
     eventChannel.AddListener <IglooMusicEvents.SetMusicTrack>(onSetMusicTrack);
     eventChannel.AddListener <IglooMusicEvents.StopPreviewMusic>(onStopPreviewMusic);
     eventChannel.AddListener <IglooMusicEvents.StopAllMusic>(onStopAllMusic);
 }
 private void Start()
 {
     eventChannel = new EventChannel(Service.Get <EventDispatcher>());
     eventChannel.AddListener <HudEvents.SetSubtaskText>(onSubtaskTextSet);
     eventChannel.AddListener <HudEvents.RemoveSubtaskText>(onRemoveSubtaskText);
     eventChannel.AddListener <HudEvents.DestroySubtaskText>(onDestroySubtaskText);
     eventChannel.AddListener <HudEvents.PermanentlySuppressQuestNotifier>(onPermanentlySuppressQuestNotifier);
     eventChannel.AddListener <HudEvents.SuppressQuestNotifier>(onSuppressQuestNotifier);
 }
 private void Awake()
 {
     localizer            = Service.Get <Localizer>();
     eventDispatcher      = Service.Get <EventDispatcher>();
     eventChannel         = new EventChannel(eventDispatcher);
     dataEntityCollection = Service.Get <CPDataEntityCollection>();
     eventChannel.AddListener <IglooServiceEvents.ForceLeave>(onForceLeave);
     eventChannel.AddListener <IglooServiceEvents.IglooUpdated>(onIglooUpdated);
 }
 private void setupListeners()
 {
     clothingDesignerEventChannel = new EventChannel(ClothingDesignerContext.EventBus);
     clothingDesignerEventChannel.AddListener <ClothingDesignerUIEvents.UpdateCameraState>(onUpdateCameraState);
     customizationEventChannel = new EventChannel(CustomizationContext.EventBus);
     customizationEventChannel.AddListener <CustomizerUIEvents.CameraZoomInOnGameObject>(frameObjectWithCamera);
     customizationEventChannel.AddListener <CustomizerUIEvents.StartPurchaseMoment>(onStartPurchaseMoment);
     customizationEventChannel.AddListener <CustomizerUIEvents.EndPurchaseMoment>(onEndPurchaseMoment);
 }
Esempio n. 29
0
 private void setupListeners()
 {
     eventChannel = new EventChannel(CustomizationContext.EventBus);
     eventChannel.AddListener <CustomizerWidgetEvents.ShowTileWidget>(onShowTileWidget);
     eventChannel.AddListener <CustomizerWidgetEvents.HideTileWidget>(onHideTileWidget);
     eventChannel.AddListener <CustomizerWidgetEvents.SetTileValue>(onSetTileValue);
     eventChannel.AddListener <CustomizerWidgetEvents.SetIsTileInteractable>(onSetInteractable);
     onValueChanged.AddListener(dispatchValueChanged);
 }
 private void Awake()
 {
     defaultHeaderText = HeaderText.text;
     eventBus          = new EventChannel(CatalogContext.EventBus);
     eventBus.AddListener <CatalogUIEvents.ShowItemsForThemeEvent>(onCatalogChallengeSelected);
     eventBus.AddListener <CatalogUIEvents.InvokeBackButtonClick>(onInvokeBackButtonClick);
     avatarRenderTextureComponent = StatsButton.GetComponent <AvatarRenderTextureComponent>();
     getLocalPlayerData();
 }