Class: Sprite_Picture

Sprite_Picture

new Sprite_Picture()

The sprite for displaying a picture.

Extends

Members

The bitmap for the sprite

blendModenumberinheritedoverrides

The blend mode to be applied to the sprite

heightnumberinherited

The height of the sprite without the scale

opacitynumberinheritedoverrides

The opacity of the sprite (0 to 255)

widthnumberinherited

The width of the sprite without the scale

Methods

Destroys the sprite

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)
Check if the touch is within the sprite
NameTypeDescription
xnumberThe x coordinate of the touch
ynumberThe y coordinate of the touch
Returns:
TypeDescription
booleanTrue if the x and y coordinates are inside the sprite
Initializes the sprite
NameTypeDescription
bitmapBitmapThe bitmap of the sprite

isBeingTouched()booleaninherited

Check if the sprite is being touched
Returns:
TypeDescription
booleanTrue if the sprite is touched

isClickEnabled()booleaninherited

Check if the sprite is clickable
Returns:
TypeDescription
booleanTrue if the sprite is clickable
Check if the sprite is pressed
Returns:
TypeDescription
booleanTrue if the sprite is pressed
Loads the picture bitmap
Sets the x and y coordiantes of the sprite
NameTypeDescription
xnumberThe x coordinate of the sprite
ynumberThe y coordinate of the sprite
Handling for when the sprite is clicked
Handling for when the mouse enters the sprite
Handling for when the mouse exits the sprite
Handling for when the sprite is pressed
Gets the picture object to display
Returns:
TypeDescription
Game_PictureThe picture object
Processing for touches

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)
Removes the "hidden" state of the sprite, making it visible
Updates the sprite for each frame

updateBitmap()

Updates the picture bitmap

updateOrigin()

Updates the origin of the sprite
Update anything else: opacity, blend mode, rotation.

updatePosition()

Updates the position of the picture
Updates the scale of the picture
Updates the tone of the picture

updateVisibility()inherited

Updates the visibility status of the sprite