public AnimatedSprite(World world, Texture2D texture, Vector2 position, Vector2 size, Single rotation, Color color, Point maxFrames, Point frameSize, SpriteSheetDirection direction, bool loop) : base(world, texture, position, size, rotation, color) { this.maxFrames = maxFrames; this.frameSize = frameSize; this.direction = direction; this.Loop = loop; if (Direction == SpriteSheetDirection.LeftToRight) this.currentFrame = Point.Zero; else if (Direction == SpriteSheetDirection.RightToLeft) this.currentFrame = new Point(maxFrames.X, 0); else throw new ArgumentOutOfRangeException("direction", "Only left-to-right and right-to-left are supported at this time"); }
public AnimatedSprite(World world, Texture2D texture, Vector2 position, Vector2 size, Single rotation, Color color, Point maxFrames, Point frameSize, SpriteSheetDirection direction, bool loop) : base(world, texture, position, size, rotation, color) { this.maxFrames = maxFrames; this.frameSize = frameSize; this.direction = direction; this.Loop = loop; this.currentFrame = FirstFrame; }
public AnimatedSprite(World world, Texture2D texture, Vector2 position, Vector2 size, Single rotation, Point maxFrames, Point frameSize, SpriteSheetDirection direction, bool loop) : this(world, texture, position, size, rotation, Color.White, maxFrames, frameSize, direction, loop) { }