Scratch for Java

AnimatedSprite

The AnimatedSprite class represents a sprite that can play animations. It extends the Sprite class and provides methods to add animations, play animations, set the interval between animation frames, and reset the animation.

Example usage:

AnimatedSprite sprite = new AnimatedSprite();
sprite.addCostume("idle", "assets/idle.png");
sprite.addAnimation("walk", "assets/walk_%d.png", 4);
sprite.playAnimation("walk");
AnimatedSprite