예제 #1
0
        public void Fill(NodeAddedEvent e, LeagueFirstEntranceRewardNotificationNode notification, LeagueDialogNode popup, [JoinAll] UserWithLeagueNode user, [JoinByLeague] LeagueNode league, [JoinAll] Optional <SingleNode <WindowsSpaceComponent> > screens)
        {
            PopupDialogComponent popupDialog = popup.popupDialog;

            popupDialog.itemsContainer.DestroyChildren();
            popupDialog.leagueIcon.SpriteUid = league.leagueIcon.SpriteUid;
            popupDialog.leagueIcon.GetComponent <Image>().preserveAspect = true;
            popupDialog.headerText.text = league.leagueEnterNotificationTexts.HeaderText;
            popupDialog.text.text       = league.leagueEnterNotificationTexts.Text;
            int num = 0;

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