Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new timeline.
        /// </summary>
        /// <param name="duration">The length of the timeline in milliseconds.
        /// Leave blank to have tweens set it.</param>
        /// <returns></returns>
        public static TweenTimeline NewTimeline(float duration)
        {
            var timeline = new TweenTimeline(duration);

            timelines.Add(timeline);
            return(timeline);
        }
Ejemplo n.º 2
0
        public static TweenTimeline NewTimeline()
        {
            var timeline = new TweenTimeline(0);

            timeline.AdaptiveDuration = true;
            timelines.Add(timeline);
            return(timeline);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates a new tween and timeline.
        /// </summary>
        /// <param name="obj">The object to tween.</param>
        /// <param name="easingFunction">The easing function to use. (e.g. Easing.Linear)</param>
        /// <param name="endTime">The time, in milliseconds when the tween will end.</param>
        /// <param name="startTime">The time in milliseconds when the tween will begin.</param>
        /// <returns>A TweenTimeline with a tween attached.</returns>
        public static void Tween <T>(object target, string propertyName, T value, float duration, EasingFunction easingFunction, LerpFunction <T> lerpFunction, float delay = 0)
        {
            var timeline = new TweenTimeline();
            var property = timeline.AddProperty <T>(target, propertyName, lerpFunction);

            property.AddFrame(duration, value);
            singleTimelines.Add(timeline);
        }