Class: Sprite_Actor

Sprite_Actor

new Sprite_Actor(battler)

The sprite for displaying an actor.
NameTypeDescription
battlerGame_BattlerThe battler object

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

Sprite_Actor.MOTIONSObjectstatic

Index and loop data for a motion

Methods

checkBattler(battler)booleaninherited

Check if the current battler is the same as the passed battler
NameTypeDescription
battlerGame_BattlerThe battler to check
Returns:
TypeDescription
booleanTrue if the battler matches the current battler

createDamageSprite()inherited

Creates a damage popup sprite

createMainSprite()

Creates the main sprite. See Sprite

createShadowSprite()

Creates a shadow sprite. See Sprite

createStateSprite()

Creates a state overlay sprite. See Sprite_StateOverlay

createWeaponSprite()

Creates a weapon sprite. See Sprite_Weapon

damageOffsetX()numberinheritedoverrides

Get the damage offset x value
Returns:
TypeDescription
numberThe damage offset x value

damageOffsetY()numberinheritedoverrides

Get the damage offset y value
Returns:
TypeDescription
numberThe damage offset y value

destroy()inherited

Destroys the sprite

destroyDamageSprite(sprite)inherited

Destroy a damage popup sprite
NameTypeDescription
spriteSprite_DamageThe damage sprite to destroy

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]

hide()inherited

Makes the sprite "hidden" (not visible)

hitTest(x, y)booleaninherited

Check if the touch is within the sprite
NameTypeDescription
xnumberThe x coordinate of the touch
ynumberThe y coordinate of the touch
Returns:
TypeDescription
booleanTrue if the x and y coordinates are inside the sprite

inHomePosition()booleaninherited

Check if the sprite is in its home position
Returns:
TypeDescription
booleanTrue if the sprite is in its home position

initMembers()inheritedoverrides

Initialize sprite variables

initialize(bitmap)inheritedoverrides

Initializes the sprite
NameTypeDescription
bitmapBitmapThe bitmap of the sprite

isBeingTouched()booleaninherited

Check if the sprite is being touched
Returns:
TypeDescription
booleanTrue if the sprite is touched

isClickEnabled()booleaninherited

Check if the sprite is clickable
Returns:
TypeDescription
booleanTrue if the sprite is clickable

isEffecting()booleaninherited

Check if the sprite is effecting
Returns:
TypeDescription
booleanTrue if effecting. By default this will always return false when called from Sprite_Battler

isMoving()booleaninherited

Check if the sprite is moving
Returns:
TypeDescription
booleanTrue if moving.

isPressed()booleaninherited

Check if the sprite is pressed
Returns:
TypeDescription
booleanTrue if the sprite is pressed
Get the main battler sprite
Returns:
TypeDescription
Sprite_BattlerThe main battler sprite

motionSpeed()number

Get the motion speed
Returns:
TypeDescription
numberThe speed of the motion

move(x, y)inherited

Sets the x and y coordiantes of the sprite
NameTypeDescription
xnumberThe x coordinate of the sprite
ynumberThe y coordinate of the sprite

moveToStartPosition()

Move the sprite to the starting position

onClick()inherited

Processing when the sprite is clicked

onMouseEnter()inherited

Processing when the mouse enters the sprite

onMouseExit()inherited

Handling for when the mouse exits the sprite
Processing for when movement ends

onPress()inherited

Processing when the sprite is pressed

processTouch()inherited

Processing for touches

refreshMotion()

Refresh method for the motion

retreat()

Retreats the actor sprite

setActorHome(index)

Sets the actor sprite's home
NameTypeDescription
indexnumberThe index of the battler

setBattler(battler)inheritedoverrides

Set the battler to a new battler
NameTypeDescription
battlerGame_BattlerThe new battler for the sprite

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

setHome(x, y)inherited

Set the sprite's home
NameTypeDescription
xnumberThe X value for the sprite's home
ynumberThe Y value for the sprite's home

setHue(hue)inherited

Sets the hue rotation value
NameTypeDescription
huenumberThe hue value (-360, 360)

setupDamagePopup()inherited

Sets up a damage popup sprite

setupMotion()

Sets up a motion

setupWeaponAnimation()

Sets up a weapon animation

shouldStepForward()boolean

Check if the actor should be stepped forward
Returns:
TypeDescription
booleanTrue if the actor should be stepped forward

show()inherited

Removes the "hidden" state of the sprite, making it visible

startEntryMotion()

Starts the entry motion

startMotion(motionType)

Starts a motion of given type
NameTypeDescription
motionTypestringThe type of motion to start

startMove(x, y, duration)inherited

Starts a movement for the sprite
NameTypeDescription
xnumberThe target x offset for the sprite
ynumberThe target y offset for the sprite
durationnumberThe duration of the movement in frames

stepBack()

Steps the actor sprite backward

stepForward()

Steps the actor sprite forward
Updates the sprite for each frame

updateBitmap()inheritedoverrides

Update the sprite's bitmap

updateDamagePopup()inherited

Update the sprite's damage popups

updateFrame()inheritedoverrides

Update the sprite's frame

updateMain()inheritedoverrides

Update the main elements of the sprite

updateMotion()

Update for sprite motions

updateMotionCount()

Update the motion count

updateMove()inheritedoverrides

Update sprite movement

updatePosition()inherited

Update the sprite's position

updateSelectionEffect()inherited

Update the selection effect for the sprite

updateShadow()

Update the shadow sprite

updateTargetPosition()

Updates the sprite's target position

updateVisibility()inherited

Updates the visibility status of the sprite