Constructor
new CollectiblCoin()
Constructs a new collectible coin, loads its images, sets collision offsets,
positions it randomly within specified ranges, and starts its animation.
Members
IMAGES :Array.<string>
An array of coin images for animation.
Type:
- Array.<string>
Methods
animate()
Starts or restarts the animation interval that cycles through the coin images.
Uses the playAnimation method to move through the IMAGES array.
reset()
Resets the coin's position to a random location within a specified range
and restarts its animation. Clears any existing animation interval before restarting.