Class: Sprite_Balloon

Sprite_Balloon

new Sprite_Balloon()

The sprite for displaying a balloon icon.

Extends

Members

The bitmap for the sprite

blendModenumberinherited

The blend mode to be applied to the sprite

heightnumberinherited

The height of the sprite without the scale

opacitynumberinherited

The opacity of the sprite (0 to 255)

widthnumberinherited

The width of the sprite without the scale

Methods

Destroys the sprite

frameIndex()number

Get the balloon frame index
Returns:
TypeDescription
numberThe index of the balloon's frame

getBlendColor()arrayinherited

Gets the blend color for the sprite
Returns:
TypeDescription
arrayThe blend color [r, g, b, a]

getColorTone()arrayinherited

Gets the color tone for the sprite
Returns:
TypeDescription
arrayThe color tone [r, g, b, gray]
Makes the sprite "hidden" (not visible)
Initialize sprite variables
Initializes the sprite
NameTypeDescription
bitmapBitmapThe bitmap of the sprite

isPlaying()boolean

Check if the balloon animation is playing
Returns:
TypeDescription
booleanTrue if the balloon is playing
Loads the bitmap file with balloons
Sets the x and y coordiantes of the sprite
NameTypeDescription
xnumberThe x coordinate of the sprite
ynumberThe y coordinate of the sprite

setBlendColor(color)inherited

Sets the blend color for the sprite
NameTypeDescription
colorarrayThe blend color [r, g, b, a]

setColorTone(tone)inherited

Sets the color tone for the sprite
NameTypeDescription
tonearrayThe color tone [r, g, b, gray]

setFrame(x, y, width, height)inherited

Sets the rectagle of the bitmap that the sprite displays
NameTypeDescription
xnumberThe x coordinate of the frame
ynumberThe y coordinate of the frame
widthnumberThe width of the frame
heightnumberThe height of the frame
Sets the hue rotation value
NameTypeDescription
huenumberThe hue value (-360, 360)

setup(targetSprite, number)

Sets up the animation
NameTypeDescription
targetSpriteSpriteThe sprite to show the balloon on
numberballoonIdThe id of the balloon to show
Removes the "hidden" state of the sprite, making it visible
Get the balloon animation speed
Returns:
TypeDescription
numberThe speed of the balloon animation
Updates the sprite for each frame
Updates the balloon frame

updatePosition()

Updates the position of the balloon

updateVisibility()inherited

Updates the visibility status of the sprite

waitTime()number

Get the balloon animation wait time
Returns:
TypeDescription
numberThe wait time for the balloon animation