/// <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; }
/// <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)); } }
internal static void ClearSlideshowOverride() { slideshowOverride = null; }
internal static CustomSlideshow OverrideNextSlideshow(SlugBaseCharacter ply, string customSlideshowName) { slideshowOverride = ply.BuildSlideshow(customSlideshowName); return(slideshowOverride); }
/// <summary> /// Creates a single slide from a JSON string. /// </summary> public SlideshowSlide(CustomSlideshow owner, string json) : this(owner, json.dictionaryFromJson()) { }