44import org .openpatch .scratch .Sprite ;
55
66/**
7- * The AnimatedSprite class represents a sprite that can play animations. It
8- * extends the Sprite
9- * class and provides methods to add animations, play animations, set the
10- * interval between animation
7+ * The AnimatedSprite class represents a sprite that can play animations. It extends the Sprite
8+ * class and provides methods to add animations, play animations, set the interval between animation
119 * frames, and reset the animation.
1210 *
13- * <p>
14- * Example usage:
11+ * <p>Example usage:
1512 *
1613 * <pre>{@code
1714 * AnimatedSprite sprite = new AnimatedSprite();
@@ -32,10 +29,9 @@ public class AnimatedSprite extends Sprite {
3229 /**
3330 * Adds an animation to the sprite.
3431 *
35- * @param name the name of the animation
36- * @param pattern the pattern (@see String#format) of the file names. The frame
37- * starts from 1.
38- * @param frames the number of frames in the animation
32+ * @param name the name of the animation
33+ * @param pattern the pattern (@see String#format) of the file names. The frame starts from 1.
34+ * @param frames the number of frames in the animation
3935 */
4036 public void addAnimation (String name , String pattern , int frames ) {
4137 String [] animation = new String [frames ];
@@ -51,10 +47,9 @@ public void addAnimation(String name, String pattern, int frames) {
5147 /**
5248 * Adds an animation to the sprite.
5349 *
54- * @param name the name of the animation
50+ * @param name the name of the animation
5551 * @param builder a function that builds the file names for the animation frames
56- * @param frame the number of frames in the animation. The frame starts from
57- * 1.
52+ * @param frame the number of frames in the animation. The frame starts from 1.
5853 */
5954 public void addAnimation (
6055 String name , java .util .function .Function <Integer , String > builder , int frame ) {
@@ -70,10 +65,10 @@ public void addAnimation(
7065 /**
7166 * Adds an animation to the sprite.
7267 *
73- * @param name the name of the animation
74- * @param path the path to the animation frames
68+ * @param name the name of the animation
69+ * @param path the path to the animation frames
7570 * @param frames the number of frames in the animation
76- * @param width the width of each frame
71+ * @param width the width of each frame
7772 * @param height the height of each frame
7873 */
7974 public void addAnimation (String name , String path , int frames , int width , int height ) {
@@ -83,12 +78,12 @@ public void addAnimation(String name, String path, int frames, int width, int he
8378 /**
8479 * Adds an animation to the sprite.
8580 *
86- * @param name the name of the animation
87- * @param path the path to the animation frames
81+ * @param name the name of the animation
82+ * @param path the path to the animation frames
8883 * @param frames the number of frames in the animation
89- * @param width the width of each frame
84+ * @param width the width of each frame
9085 * @param height the height of each frame
91- * @param row the row of the animation frames
86+ * @param row the row of the animation frames
9287 */
9388 public void addAnimation (String name , String path , int frames , int width , int height , int row ) {
9489 String [] animation = new String [frames ];
@@ -103,12 +98,12 @@ public void addAnimation(String name, String path, int frames, int width, int he
10398 /**
10499 * Adds an animation to the sprite.
105100 *
106- * @param name the name of the animation
107- * @param path the path to the animation frames
108- * @param frames the number of frames in the animation
109- * @param width the width of each frame
110- * @param height the height of each frame
111- * @param column the column of the animation frames
101+ * @param name the name of the animation
102+ * @param path the path to the animation frames
103+ * @param frames the number of frames in the animation
104+ * @param width the width of each frame
105+ * @param height the height of each frame
106+ * @param column the column of the animation frames
112107 * @param useColumns whether to use columns or rows
113108 */
114109 public void addAnimation (
0 commit comments