Constructor
new ChickenSmall()
Constructs a new ChickenSmall, loads images, initializes position,
sets its speed, applies gravity, and starts animation.
Members
IMAGES_DEAD :Array.<string>
An array of image paths for the chicken's death animation.
Type:
- Array.<string>
IMAGES_WALKING :Array.<string>
An array of image paths for the chicken's walking animation.
Type:
- Array.<string>
Methods
animate()
Manages the chicken's movement and animation intervals.
The chicken will walk, play walking animation, jump if on the ground,
and switch to the death animation when it dies.
moveEnemie()
Sets an interval for the chicken to move left, as long as it is not dead.
resetEnemy()
Resets the chicken to a new position, restores energy, revives it, and
assigns a random speed within the specified range.