public NonLoopAnimation(GameTexture sprites, float frameLengthModifier, float depth, List<Vector2> boundsPoints) { sprites_ = sprites; currentFrame_ = 0; totalFrames_ = sprites.getNumberOfImages(); position_ = Vector2.Zero; rotation_ = Vector2.Zero; frameLengthModifier_ = frameLengthModifier; moved_ = Vector2.Zero; depth_ = depth; boundsPolygon_ = new ConvexPolygonInterface[1]; boundsPolygon_[0] = new ConvexPolygon(boundsPoints, Vector2.Zero); perFrameBounds_ = false; }
public NonLoopAnimation(GameTexture sprites, float frameLengthModifier, float depth, List<List<Vector2>> boundsPoints) { sprites_ = sprites; currentFrame_ = 0; totalFrames_ = sprites.getNumberOfImages(); position_ = Vector2.Zero; rotation_ = Vector2.Zero; frameLengthModifier_ = frameLengthModifier; moved_ = Vector2.Zero; depth_ = depth; boundsPolygon_ = new ConvexPolygonInterface[boundsPoints.Count]; for (int i = 0; i < boundsPoints.Count; i++) { boundsPolygon_[i] = new ConvexPolygon(boundsPoints[i], Vector2.Zero); } perFrameBounds_ = true; }