Class: Sprite_Animation

Sprite_Animation

new Sprite_Animation()

The sprite for displaying an 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

canStart()boolean

Check if the animation can start playing
Returns:
TypeDescription
booleanTrue if the animation can start
Check if the animation has ended. Sets playing to false if ended
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 animation is currently playing
Sets the x and y coordiantes of the sprite
NameTypeDescription
xnumberThe x coordinate of the sprite
ynumberThe y coordinate of the sprite

onAfterRender(The)

Handling after render occurs
NameTypeDescription
ThePIXI.Rendererrenderer for the game

onBeforeRender(The)

Handling before render occurs
NameTypeDescription
ThePIXI.Rendererrenderer for the game

processFlashTimings()

Handles showing flashes at the right frame

processSoundTimings()

Handles playing sound effects at the right frame

resetViewport(The)

Resets the viewport
NameTypeDescription
ThePIXI.Rendererrenderer for the game

setBlendColor(color)inherited

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

setCameraMatrix()

Sets the camera matrix for the animation

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)

setProjectionMatrix(The)

Sets the projection matrix for the animation
NameTypeDescription
ThePIXI.Rendererrenderer for the game

setRotation(x, y, z)

Sets the rotation of the animation
NameTypeDescription
xnumberThe x value of the rotation
ynumberThe y value of the rotation
znumberThe z value of the rotation

setViewport(The)

Sets the viewport for the animation
NameTypeDescription
ThePIXI.Rendererrenderer for the game

setup({Array, animation, mirror, delay, previous)

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
previousSprite_Animation|Sprite_AnimationMV|nullThe previous animation sprite

shouldWaitForPrevious()boolean

Check if the animation should wait for the previous animation to finish
Returns:
TypeDescription
booleanTrue if animation should wait for the previous animation to finish
Removes the "hidden" state of the sprite, making it visible

targetPosition(The)Point

Sets the target position for the animation
NameTypeDescription
ThePIXI.Rendererrenderer for the game
Returns:
TypeDescription
PointThe point representing the x and y coordinates of the animation

targetSpritePosition(The)Point

Gets the target sprite's position
NameTypeDescription
TheSpritesprite to show the animation on
Returns:
TypeDescription
PointA point representing the x/y coordinates where the sprite is
Updates the sprite for each frame

updateEffectGeometry()

Update for effect geometry
Update for flash effects
Update for main effects

updateVisibility()inherited

Updates the visibility status of the sprite