Ejemplo n.º 1
0
        /// <inheritdoc/>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="value"/> or <paramref name="property"/> is <see langword="null"/>.
        /// </exception>
        /// <exception cref="ArgumentException">
        /// The value of <paramref name="property"/> must not be <see langword="null"/>.
        /// </exception>
        public void Set(ref SkeletonPose value, IAnimatableProperty <SkeletonPose> property)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }
            if (property == null)
            {
                throw new ArgumentNullException("property");
            }

            var animationValue = property.AnimationValue;

            if (animationValue == null)
            {
                if (property.HasBaseValue)
                {
                    // The SkeletonPose will be recycled in Reset().
                    Create(ref value, out animationValue);
                    property.AnimationValue = animationValue;
                }
                else
                {
                    throw new ArgumentException("The value of the property must not be null. This exception usually occurs when an IAnimatableProperty<SkeletonPose> is being animated, but the value of the property is null. A SkeletonPose must be set before the property can be animated.");
                }
            }

            SkeletonHelper.Copy(value, animationValue);
        }
Ejemplo n.º 2
0
 /// <inheritdoc/>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="source"/> or <paramref name="target"/> is <see langword="null"/>.
 /// </exception>
 public void Copy(ref SkeletonPose source, ref SkeletonPose target)
 {
     SkeletonHelper.Copy(source, target);
 }