Esempio n. 1
0
 /// <summary>
 /// Creates an empty slideshow slide.
 /// </summary>
 public SlideshowSlide(CustomSlideshow owner)
 {
     Enabled    = true;
     Owner      = owner;
     CameraPath = new List <Vector3>();
     Duration   = 0f;
     FadeIn     = 0.75f;
     FadeOut    = 0.75f;
 }
Esempio n. 2
0
        /// <summary>
        /// Creates a single slide from a JSON object.
        /// </summary>
        public SlideshowSlide(CustomSlideshow owner, JsonObj data) : this(owner)
        {
            Duration = -1f;

            foreach (var pair in data)
            {
                LoadValue(pair.Key, pair.Value);
            }

            if (SceneName == null)
            {
                throw new ArgumentException("Missing \"name\"!", nameof(data));
            }
            if (Duration < 0f)
            {
                throw new ArgumentException("Missing or invalid \"duration\" value!", nameof(data));
            }
            if (CameraPath.Count == 0)
            {
                CameraPath.Add(new Vector3(0f, 0f, 3f));
            }
        }
Esempio n. 3
0
 internal static void ClearSlideshowOverride()
 {
     slideshowOverride = null;
 }
Esempio n. 4
0
 internal static CustomSlideshow OverrideNextSlideshow(SlugBaseCharacter ply, string customSlideshowName)
 {
     slideshowOverride = ply.BuildSlideshow(customSlideshowName);
     return(slideshowOverride);
 }
Esempio n. 5
0
 /// <summary>
 /// Creates a single slide from a JSON string.
 /// </summary>
 public SlideshowSlide(CustomSlideshow owner, string json) : this(owner, json.dictionaryFromJson())
 {
 }