public UnmovingSprite( AnimationSurface animationSurface, Point2 location) { Contract.Requires(animationSurface != null); _animationSurface = animationSurface; _location = location; }
public UniformMotionSprite( AnimationSurface animationSurface, Point2 startLocation, Vector2 velocity, float totalTime) : this(animationSurface, startLocation, startLocation + (Vector2)(velocity * totalTime), totalTime) { }
public UniformMotionSprite( AnimationSurface animationSurface, Point2 startLocation, Point2 endLocation, float totalTime) { Contract.Requires(animationSurface != null); _animationSurface = animationSurface; StartLocation = startLocation; _location = startLocation; _diffVector = endLocation - startLocation; _totalTime = totalTime; }
public UniformMotionSprite( AnimationSurface animationSurface, Point2 startLocation, Point2 endLocation, float speedOrTotalTime, bool isSpeed) : this(animationSurface, startLocation, endLocation, isSpeed ? (float)(endLocation - startLocation).Length / speedOrTotalTime : speedOrTotalTime) { }