protected override void OnDestroy() { base.OnDestroy(); VerticalScrollingLayoutElementPool scroller = Scroller; scroller.OnPoolReady = (Action)Delegate.Remove(scroller.OnPoolReady, new Action(onPoolReady)); }
protected override void setupListeners() { base.setupListeners(); VerticalScrollingLayoutElementPool scroller = Scroller; scroller.OnPoolReady = (Action)Delegate.Combine(scroller.OnPoolReady, new Action(onPoolReady)); }
private void onPoolReady() { VerticalScrollingLayoutElementPool verticalScrollingLayoutElementPool = layoutElementPool; verticalScrollingLayoutElementPool.OnPoolReady = (System.Action)Delegate.Remove(verticalScrollingLayoutElementPool.OnPoolReady, new System.Action(onPoolReady)); isPoolReady = true; initializePool(); }
protected virtual void OnDestroy() { catalogEventChannel.RemoveAllListeners(); Service.Get <EventDispatcher>().RemoveListener <CatalogServiceEvents.ItemPurchaseCompleteEvent>(onPurchaseComplete); Service.Get <EventDispatcher>().RemoveListener <CatalogServiceEvents.ItemPurchaseErrorEvent>(onPurchaseError); VerticalScrollingLayoutElementPool scroller = Scroller; scroller.OnElementShown = (Action <int, GameObject>)Delegate.Remove(scroller.OnElementShown, new Action <int, GameObject>(onElementShown)); VerticalScrollingLayoutElementPool scroller2 = Scroller; scroller2.OnElementHidden = (Action <int, GameObject>)Delegate.Remove(scroller2.OnElementHidden, new Action <int, GameObject>(onElementHidden)); CoroutineRunner.StopAllForOwner(this); }
protected virtual void setupListeners() { catalogEventChannel = new EventChannel(CatalogContext.EventBus); catalogEventChannel.AddListener <CatalogUIEvents.ShopItemClickedEvent>(onShopItemClickedEvent); catalogEventChannel.AddListener <CatalogUIEvents.BuyPanelCloseButtonClickedEvent>(onBuyPanelCloseButtonClickedEvent); catalogEventChannel.AddListener <CatalogUIEvents.BuyPanelPurchaseButtonClickedEvent>(onBuyPanelPurchaseButtonClickedEvent); catalogEventChannel.AddListener <CatalogUIEvents.BuyPanelWearItButtonClickedEvent>(onBuyPanelWearItButtonClickedEvent); catalogEventChannel.AddListener <CatalogUIEvents.BuyPanelLearnMoreButtonClickedEvent>(onBuyPanelLearnMoreButtonClickedEvent); catalogEventChannel.AddListener <CatalogUIEvents.BuyPanelRequiredLevelButtonClickedEvent>(onBuyPanelRequiredLevelButtonClickedEvent); Service.Get <EventDispatcher>().AddListener <CatalogServiceEvents.ItemPurchaseCompleteEvent>(onPurchaseComplete); Service.Get <EventDispatcher>().AddListener <CatalogServiceEvents.ItemPurchaseErrorEvent>(onPurchaseError); VerticalScrollingLayoutElementPool scroller = Scroller; scroller.OnElementShown = (Action <int, GameObject>)Delegate.Combine(scroller.OnElementShown, new Action <int, GameObject>(onElementShown)); VerticalScrollingLayoutElementPool scroller2 = Scroller; scroller2.OnElementHidden = (Action <int, GameObject>)Delegate.Combine(scroller2.OnElementHidden, new Action <int, GameObject>(onElementHidden)); }
private void Start() { ClubPenguin.Core.SceneRefs.Get <CameraRenderingControl>().DisableRendering(includeChat: true, cullUILayer: false); JumpToNewMessageButton.gameObject.SetActive(value: false); JumpToNewMessageButton.onClick.AddListener(onJumpToNewMessageButtonClicked); dataEntityCollection = Service.Get <CPDataEntityCollection>(); layoutElementPool = GetComponent <VerticalScrollingLayoutElementPool>(); VerticalScrollingLayoutElementPool verticalScrollingLayoutElementPool = layoutElementPool; verticalScrollingLayoutElementPool.OnPoolReady = (System.Action)Delegate.Combine(verticalScrollingLayoutElementPool.OnPoolReady, new System.Action(onPoolReady)); VerticalScrollingLayoutElementPool verticalScrollingLayoutElementPool2 = layoutElementPool; verticalScrollingLayoutElementPool2.OnElementShown = (Action <int, GameObject>)Delegate.Combine(verticalScrollingLayoutElementPool2.OnElementShown, new Action <int, GameObject>(onElementShown)); VerticalScrollingLayoutElementPool verticalScrollingLayoutElementPool3 = layoutElementPool; verticalScrollingLayoutElementPool3.OnElementHidden = (Action <int, GameObject>)Delegate.Combine(verticalScrollingLayoutElementPool3.OnElementHidden, new Action <int, GameObject>(onElementHidden)); avatarImageComponent = GetComponent <AvatarImageComponent>(); AvatarImageComponent obj = avatarImageComponent; obj.OnImageReady = (Action <DataEntityHandle, Texture2D>)Delegate.Combine(obj.OnImageReady, new Action <DataEntityHandle, Texture2D>(onImageReady)); imageRequests = new Queue <long>(); if (dataEntityCollection.TryGetComponent <ChatHistoryData>(dataEntityCollection.LocalPlayerHandle, out var component)) { parseChatHistory(component.MessageHistory); } Content.LoadAsync(onLocalChatBlockLoaded, localChatBlockContentKey); Content.LoadAsync(onRemoteChatBlockLoaded, remoteChatBlockContentKey); Content.LoadAsync(onFriendChatBlockLoaded, friendChatBlockContentKey); eventChannel = new EventChannel(Service.Get <EventDispatcher>()); eventChannel.AddListener <ChatServiceEvents.ChatMessageReceived>(chatMessageReceived); eventChannel.AddListener <ChatServiceEvents.ChatMessageBlockedReceived>(onChatMessageBlockedReceived); eventChannel.AddListener <ChatMessageSender.SendChatMessage>(onSendChatMessage); eventChannel.AddListener <ChatServiceEvents.SendChatActivity>(onSendChatActivity); eventChannel.AddListener <ChatServiceEvents.SendChatActivityCancel>(onSendChatActivityCancel); eventChannel.AddListener <ChatServiceEvents.ChatActivityReceived>(onChatActivityReceived); eventChannel.AddListener <ChatServiceEvents.ChatActivityCancelReceived>(onChatActivityCancelReceived); }