Exemple #1
0
        public void Fill(NodeAddedEvent e, ReleaseGiftsNotificationNode notification, SingleNode <ReleaseGiftsPopup> popup, [JoinAll] UserNode user, [JoinAll] Optional <SingleNode <WindowsSpaceComponent> > screens)
        {
            ReleaseGiftsPopup popup2 = popup.component;

            popup2.itemsContainer.DestroyChildren();
            int num = 0;

            foreach (KeyValuePair <long, int> pair in notification.releaseGiftsNotification.Reward)
            {
                popup2.itemPrefab.GetComponent <AnimationTriggerDelayBehaviour>().dealy = (num + 1) * popup2.itemsShowDelay;
                ReleaseGiftItemComponent component = Object.Instantiate <ReleaseGiftItemComponent>(popup2.itemPrefab, popup2.itemsContainer, false);
                Entity entity = Flow.Current.EntityRegistry.GetEntity(pair.Key);
                int    num2   = pair.Value;
                component.preview.SpriteUid = entity.GetComponent <ImageItemComponent>().SpriteUid;
                bool flag = num2 > 1;
                component.text.text = entity.GetComponent <DescriptionItemComponent>().Name + (!flag ? string.Empty : " x");
                component.gameObject.SetActive(true);
                if (flag)
                {
                    component.count.Value = num2;
                }
                else
                {
                    component.count.gameObject.SetActive(false);
                }
                num++;
            }
            popup2.Show(!screens.IsPresent() ? new List <Animator>() : screens.Get().component.Animators);
        }
Exemple #2
0
 public void SetRewardInfo(NodeAddedEvent e, ReleaseGiftsNotificationNode notification)
 {
     notification.Entity.AddComponent(new NotificationMessageComponent(string.Empty));
 }
Exemple #3
0
 public void HidePopup(ButtonClickEvent e, SingleNode <ReleaseGiftsPopupCloseButtonComponent> button, [JoinAll] ReleaseGiftsNotificationNode notification, [JoinAll] SingleNode <ReleaseGiftsPopup> popup)
 {
     popup.component.Hide();
     base.ScheduleEvent <NotificationShownEvent>(notification);
 }