Class: Sprite_Base

(abstract) Sprite_Base()

(abstract) new Sprite_Base()

The sprite class with a feature which displays animations.
Properties:
Name Type Description
_animationSprites Array.<Sprite_Animation> The animation sprites assigned to the sprite object.
_effectTarget Sprite_Base The target that will have the animations applied to it.
_hiding Boolean Property determining the sprite's visibility.

Extends

Methods

hide()

Hides the sprite.

initialize()

isAnimationPlaying() → {boolean}

Returns true if an animation is currently playing.
Returns:
Type
boolean

show()

Shows the sprite.

startAnimation(animation, mirror, delay)

Starts a new animation on the current sprite by assigning a new Sprite_Animation object to the sprite's parent.
Parameters:
Name Type Description
animation RPG.Animation
mirror Boolean
delay Number

update()

updateAnimationSprites()

Updates the animation sprites, cloning them; if the sprite is playing, pushes the sprites into animation sprites, otherwise the sprite is removed.

updateVisibility()

Updadtes the visibility of the sprite based on the _hiding property.