The Code for the Sprite
/**
* A Buzzy jumping
*
* @author Prof. David Bernstein, James Madison University
* @see "The Design and Implementation of Multimedia Software (c) 2011"
* @version 1.0
* @augments DescribedSprite
*/
BuzzyJumping.prototype = new DescribedSprite();
BuzzyJumping.prototype.constructor = BuzzyJumping;
/**
* Default Constructor
*/
function BuzzyJumping()
{
this.initializeBuzzyJumping();
}
BuzzyJumping.prototype.initializeBuzzyJumping = function()
{
this.initializeDescribedSprite();
this.addKeyTime(1000, new Point2D( 0., 355.), 0., 1.0, new BuzzyStanding());
this.addKeyTime(1500, new Point2D( 0., 355.), 0., 1.0, new BuzzyCrouching());
this.addKeyTime(2000, new Point2D( 0., 355.), 0., 1.0, new BuzzyLeaningForward());
this.addKeyTime(4000, new Point2D(180., 75.), 0., 1.0, new BuzzyLeaningForward());
this.addKeyTime(6000, new Point2D(540., 355.), 0., 1.0, new BuzzyCrouching());
this.addKeyTime(6500, new Point2D(540., 355.), 0., 1.0, new BuzzyStanding());
this.setEndState(this.REMAIN);
}