Пример #1
0
    private void DisplayTimelapse(RetiredColonyData data, GameObject container)
    {
        RectTransform reference = container.GetComponent <HierarchyReferences>().GetReference <RectTransform>("PlayIcon");

        slideshow            = container.GetComponent <HierarchyReferences>().GetReference <Slideshow>("Slideshow");
        slideshow.updateType = SlideshowUpdateType.loadOnDemand;
        slideshow.SetPaused(true);
        slideshow.onBeforePlay = delegate
        {
            LoadSlideshow(data);
        };
        slideshow.onEndingPlay = delegate
        {
            LoadScreenshot(data);
        };
        if (!LoadScreenshot(data))
        {
            slideshow.gameObject.SetActive(false);
            reference.gameObject.SetActive(false);
        }
        else
        {
            slideshow.gameObject.SetActive(true);
            reference.gameObject.SetActive(true);
        }
    }