Class: Sprite_Battler

Sprite_Battler(battleropt)

new Sprite_Battler(battleropt)

The superclass of Sprite_Actorand Sprite_Enemy.
Parameters:
Name Type Attributes Description
battler Game_Battler <optional>
Properties:
Name Type Description
_battler Game_Battler
_damages Array.<Sprite_Damage>
_homeX Number
_homeY Number
_offsetX Number
_offsetY Number
_targetOffsetX Number
_targetOffsetY Number
_movementDuration Number
_selectionEffectCount Number

Extends

Methods

damageOffsetX() → {Number}

Returns:
Type
Number

damageOffsetY() → {Number}

Returns:
Type
Number

hide()

Hides the sprite.
Inherited From:

inHomePosition() → {Boolean}

Returns true if the sprite battler is in the home position.
Returns:
Type
Boolean

initialize()

Overrides:

initMembers()

isAnimationPlaying() → {boolean}

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

isEffecting() → {Boolean}

Returns false for sprite battler.
Returns:
Type
Boolean

isMoving() → {boolean}

Returns true if the sprite for the battler is moving.
Returns:
Type
boolean

onMoveEnd()

Handler for when movement has ended.

setBattler(battler)

Sets the game battler of the sprite battler.
Parameters:
Name Type Description
battler Game_Battler

setHome(x, y)

Sets the home position of the sprite battler to the given x and y coordinates.
Parameters:
Name Type Description
x Number
y Number

setupAnimation()

Sets up animation on the sprite battler.

setupDamagePopup()

Sets up damage popup on the sprite battler.

show()

Shows the sprite.
Inherited From:

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
Inherited From:

startMove(x, y, duration)

Parameters:
Name Type Description
x Number
y Number
duration Number

update()

Overrides:

updateAnimation()

Updates the sprite battler animation.

updateAnimationSprites()

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

updateBitmap()

Updates the bitmap of the sprite battler.

updateDamagePopup()

Updates the damage pop up for the sprite battler.

updateFrame()

Updates the sprite battler's current frame.

updateMain()

Updates the main loop of the sprite battler.

updateMove()

Updates movement on the sprite battler.

updatePosition()

Updates the position of the sprite battler.

updateSelectionEffect()

updateVisibility()

Overrides: