public void Fill(NodeAddedEvent e, EventContainerNotificationNode notification, [JoinAll] UserNode user, [JoinAll] Optional <SingleNode <WindowsSpaceComponent> > screens) { if (!notification.Entity.HasComponent <EventContainerNotificationComponent>()) { base.ScheduleEvent <NotificationShownEvent>(notification); } else { EventContainerPopupComponent eventContainerPopup = notification.eventContainerPopup; eventContainerPopup.itemsContainer.DestroyChildren(); long containerId = notification.Entity.GetComponent <EventContainerNotificationComponent>().ContainerId; EventContainerItemComponent component2 = Object.Instantiate <EventContainerItemComponent>(eventContainerPopup.itemPrefab, eventContainerPopup.itemsContainer, false); Entity entity = Flow.Current.EntityRegistry.GetEntity(containerId); component2.preview.SpriteUid = entity.GetComponent <ImageItemComponent>().SpriteUid; component2.text.text = entity.GetComponent <DescriptionItemComponent>().Name; component2.gameObject.SetActive(true); eventContainerPopup.Show(!screens.IsPresent() ? new List <Animator>() : screens.Get().component.Animators); } }
public void SetRewardInfo(NodeAddedEvent e, EventContainerNotificationNode notification) { notification.Entity.AddComponent(new NotificationMessageComponent(string.Empty)); }