Class: Sprite_Enemy

Sprite_Enemy

new Sprite_Enemy(battler)

The sprite for displaying an enemy.
NameTypeDescription
battlerGame_BattlerThe battler object

Extends

Members

The bitmap for the sprite

blendModenumberinheritedoverrides

The blend mode to be applied to the sprite

heightnumberinherited

The height of the sprite without the scale

opacitynumberinheritedoverrides

The opacity of the sprite (0 to 255)

widthnumberinherited

The width of the sprite without the scale

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

createStateIconSprite()

Creates the state icon sprite. See Sprite_StateIcon

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

initVisibility()

Initialize invisibility for the sprite

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()booleanoverrides

Check if the sprite has an effect playing
Returns:
TypeDescription
booleanTrue if any effect is playing

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

loadBitmap(name)

Loads the enemy bitmap
NameTypeDescription
namestringThe enemy bitmap's filename
Get the main battler sprite
Returns:
TypeDescription
Sprite_BattlerThe main battler sprite

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

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

onMoveEnd()inherited

Processing for when movement ends

onPress()inherited

Processing when the sprite is pressed

processTouch()inherited

Processing for touches

revertToNormal()

Resets the sprite to normal

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
Sets the hue rotation value
NameTypeDescription
huenumberThe hue value (-360, 360)

setupDamagePopup()inherited

Sets up a damage popup sprite

setupEffect()

Sets up an effect for the enemy sprite

show()inherited

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

startAppear()

Starts the appear effect
Starts the blink effect

startBossCollapse()

Starts the boss collapse effect

startCollapse()

Starts the collapse effect

startDisappear()

Starts the disappear effect

startEffect(effectType)

Starts an effect
NameTypeDescription
effectTypestringThe type of effect to start

startInstantCollapse()

Starts the instant collapse effect

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

startWhiten()

Starts the whiten effect
Updates the sprite for each frame

updateAppear()

Updates the appear effect

updateBitmap()inheritedoverrides

Update the sprite's bitmap
Updates the blink effect

updateBossCollapse()

Updates the boss collapse effect

updateCollapse()

Updates the collapse effect

updateDamagePopup()inherited

Update the sprite's damage popups

updateDisappear()

Updates the disappear effect

updateEffect()

Updates the sprite's effect

updateFrame()inheritedoverrides

Update the sprite's frame

updateInstantCollapse()

Updates the instant collapse effect

updateMain()inherited

Update the main elements of the sprite

updateMove()inherited

Update sprite movement

updatePosition()inheritedoverrides

Update the sprite's position

updateSelectionEffect()inherited

Update the selection effect for the sprite

updateStateSprite()

Updates the state icon sprite

updateVisibility()inherited

Updates the visibility status of the sprite

updateWhiten()

Updates the whiten effect