示例#1
0
 public CopyAnimationSprite(
     AnimationSprite originalAnimationSprite,
     IEnumerable<Point2> points)
 {
     _animationSprite = originalAnimationSprite;
     var v = (Vector2)originalAnimationSprite.Location;
     _offsetVectors = points.Select(p => (Vector2)p - v);
 }
        public ExtendTimeAnimationSprite(
            AnimationSprite animationSprite, float frontSpanTime,
            float backSpanTime)
        {
            Contract.Requires(animationSprite != null);

            _animationSprite = animationSprite;
            _frontSpanTime = frontSpanTime;
            _backSpanTime = backSpanTime;
        }
示例#3
0
        public CopyAnimationSprite(
            AnimationSprite originalAnimationSprite,
            IEnumerable<Vector2> offsetVectors)
        {
            Contract.Requires(originalAnimationSprite != null);
            Contract.Requires(offsetVectors != null);

            _animationSprite = originalAnimationSprite;
            _offsetVectors = offsetVectors;
        }
        public CustomCoordAnimationSprite(
            AnimationSprite animationSprite,
            Func<Point2, Size, Point2> coordinateTransformer)
        {
            Contract.Requires(animationSprite != null);
            Contract.Requires(coordinateTransformer != null);

            _animationSprite = animationSprite;
            _coordinateTransformer = coordinateTransformer;
        }
 public ExtendTimeAnimationSprite(
     AnimationSprite animationSprite, float backSpanTime)
     : this(animationSprite, 0, backSpanTime)
 {
 }