Class: Sprite_Animation

Sprite_Animation()

new Sprite_Animation()

The sprite for displaying an animation.
Properties:
Name Type Description
_checker1 Object [static]{key: RPG.Animation}
_checker2 Object [static]{key: RPG.Animation}
z Number
_target Sprite_Base
_animation RPG.Animation
_mirror Boolean
_delay Number
_rate Number
_duration Number
_flashColor Array.<Number>
_flashDuration Number
_screenFlashDuration Number
_hidingDuration Number
_bitmap1 Bitmap
_bitmap2 Bitmap
_cellSprites Array.<Sprite>
_screenFlashSprite ScreenSprite
_duplicated Boolean
_reduceArtifacts Boolean

Extends

Methods

absoluteX() → {Number}

Returns the absolute x position of the sprite animation.
Returns:
Type
Number

absoluteY() → {Number}

Returns the absolute y position of the sprite aniamtion.
Returns:
Type
Number

createCellSprites()

Create the cell sprites of the sprite animation.

createScreenFlashSprite()

Create the screen flash sprite of the sprite animation.

createSprites()

Create the sprites of the sprite animation.

currentFrameIndex() → {Number}

Returns the current frame index of the sprite aniamtion.
Returns:
Type
Number

initialize()

initMembers()

isPlaying() → {Boolean}

Returns true if the sprite animation is playing.
Returns:
Type
Boolean

isReady() → {Boolean}

Returns true if the sprite animation is ready.
Returns:
Type
Boolean

loadBitmaps()

Loads the bitmaps of the sprite animation.

processTimingData(timing)

Parameters:
Name Type Description
timing RPG.Animation.Timing

remove()

Removes the sprite animation.

setup(target, animation, mirror, delay)

Parameters:
Name Type Description
target Sprite_Base
animation RPG.Animation
mirror Boolean
delay Number

setupDuration()

setupRate()

startFlash(color, duration)

Parameters:
Name Type Description
color Array.<Number>
duration Number

startHiding(duration)

Starts hiding the sprite animation.
Parameters:
Name Type Description
duration Number The duration of the hide.

startScreenFlash(color, duration)

Parameters:
Name Type Description
color Array.<Number>
duration Number

update()

updateAllCellSprites(frame)

Parameters:
Name Type Description
frame Array.<Array.<Number>>

updateCellSprite(sprite, cell)

Parameters:
Name Type Description
sprite Sprite
cell Array.<Number>

updateFlash()

Updates the flash animation of the sprite animation.

updateFrame()

Updates the frame of the sprite aniamtion.

updateHiding()

Updates the hiding of the sprite animation.

updateMain()

Updates the main loop of the sprite animation.

updatePosition()

Updates the position of the sprite animation.

updateScreenFlash()