Class: Sprite_AnimationMV

Sprite_AnimationMV

new Sprite_AnimationMV()

The sprite for displaying an old format animation.

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

absoluteX()number

Get the absolute x value
Returns:
TypeDescription
numberThe absolute x value

absoluteY()number

Get the absolute y value
Returns:
TypeDescription
numberThe absolute y value

createCellSprites()

Create the cell sprites of the animation

createScreenFlashSprite()

Create the screen flash sprite of the animation

currentFrameIndex()number

Get the current animation frame's index
Returns:
TypeDescription
numberThe index of the current frame
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)
Initialize sprite variables
Initializes the sprite
NameTypeDescription
bitmapBitmapThe bitmap of the sprite

isPlaying()boolean

Check if the animation is playing
Returns:
TypeDescription
booleanTrue if the animation is playing
Check if the animation is ready to play
Returns:
TypeDescription
booleanTrue if the animation is ready to play
Loads the bitmaps for the animation
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 animation ends

processTimingData(timing)

Processes timing data
NameTypeDescription
timingObjectTiming data object

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({Array, animation, mirror, delay)

Set up the animation sprite
NameTypeDescription
{Arraytargets - The targets of the animation
animationObjectThe animation object to play
mirrorbooleanIf the animation should mirror
delaynumberFrame delay for the animation
Set up the animation duration
Set up the animation rate
Removes the "hidden" state of the sprite, making it visible

startFlash(color, duration)

Starts a flash effect
NameTypeDescription
colorArrayArray of color data
durationnumberDuration of the flash in frames

startHiding(duration)

Starts a hide effect
NameTypeDescription
durationnumberDuration of the hide in frames

startScreenFlash(color, duration)

Starts a screen flash effect
NameTypeDescription
colorArrayArray of color data
durationnumberDuration of the flash in frames
Updates the sprite for each frame

updateAllCellSprites(frame)

Updates all cell sprites
NameTypeDescription
frameArrayAnimation frame data

updateCellSprite(sprite, cell)

Updates a cell sprite
NameTypeDescription
spriteSpriteThe cell sprite to update
cellArrayCell data used to update the sprite
Update flash effects on targets
Update the animation frame
Update hide effects
Update main elements of animation
Update the animation position

updateScreenFlash()

Update flash effects for the screen

updateVisibility()inherited

Updates the visibility status of the sprite