コード例 #1
0
        /// <summary>
        /// Creates a new animation pipeline with a rectangle iteration animation as first animation.
        /// </summary>
        /// <param name="owner">The owner.</param>
        /// <param name="duration">The duration seconds.</param>]
        /// <param name="easing">The easing.</param>
        /// <param name="callback">The callback.</param>
        /// <returns>The animation pipeline.</returns>
        public static IAnimationPipeline <RectangleComponent> Iterate(this RectangleComponent owner, float duration, IEasing easing, Action <float, float> callback)
        {
            var animation = new RectangleIterateAnimation <RectangleComponent>(owner, owner.Transform.BoundingBox, owner.Filled, duration, callback)
            {
                Easing = easing
            };

            return(AnimationPipeline <RectangleComponent> .Create(animation));
        }
コード例 #2
0
ファイル: RectangleComponent.cs プロジェクト: giacomelli/Doog
 /// <summary>
 /// Initializes a new instance of the <see cref="RectangleComponent"/> class.
 /// </summary>
 /// <param name="other">The other.</param>
 public RectangleComponent(RectangleComponent other)
     : this(other.Transform.Position.X, other.Transform.Position.Y, other.Context)
 {
     Transform.Scale = other.Transform.Scale;
 }