Interface SpriteAnimationTarget
interface SpriteAnimationTarget {
isAlive?: () => boolean;
remove?: () => void;
setFrame: (frame: number) => void;
}
isAlive?: () => boolean;
remove?: () => void;
setFrame: (frame: number) => void;
}
Properties
Optional Readonlyis Alive
isAlive?: () => boolean
Optional. Returns false when the target no longer exists, stopping the animation.
Optional Readonlyremove
remove?: () => void
Optional. Removes the target from its system, used when removeWhenFinished is set.
Readonlyset Frame
setFrame: (frame: number) => void
Sets the target's current atlas frame.
Abstracts the sprite a frame animation drives, decoupling the animation core from each sprite family.