The sprite for displaying an enemy.
Name | Type | Description |
---|---|---|
battler | Game_Battler | The battler object |
Extends
Members
- The bitmap for the sprite
- The blend mode to be applied to the sprite
heightnumberinherited
- The height of the sprite without the scale
- 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
Name Type Description battler
Game_Battler The battler to check Returns:
Type Description boolean True if the battler matches the current battler createDamageSprite()inherited
- Creates a damage popup sprite
- Creates the state icon sprite. See Sprite_StateIcon
- Get the damage offset x value
Returns:
Type Description number The damage offset x value - Get the damage offset y value
Returns:
Type Description number The damage offset y value destroy()inherited
- Destroys the sprite
destroyDamageSprite(sprite)inherited
- Destroy a damage popup sprite
Name Type Description sprite
Sprite_Damage The damage sprite to destroy getBlendColor()arrayinherited
- Gets the blend color for the sprite
Returns:
Type Description array The blend color [r, g, b, a] getColorTone()arrayinherited
- Gets the color tone for the sprite
Returns:
Type Description array The 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
Name Type Description x
number The x coordinate of the touch y
number The y coordinate of the touch Returns:
Type Description boolean True if the x and y coordinates are inside the sprite inHomePosition()booleaninherited
- Check if the sprite is in its home position
Returns:
Type Description boolean True if the sprite is in its home position - Initialize sprite variables
- Initialize invisibility for the sprite
- Initializes the sprite
Name Type Description bitmap
Bitmap The bitmap of the sprite isBeingTouched()booleaninherited
- Check if the sprite is being touched
Returns:
Type Description boolean True if the sprite is touched isClickEnabled()booleaninherited
- Check if the sprite is clickable
Returns:
Type Description boolean True if the sprite is clickable isEffecting()booleanoverrides
- Check if the sprite has an effect playing
Returns:
Type Description boolean True if any effect is playing isMoving()booleaninherited
- Check if the sprite is moving
Returns:
Type Description boolean True if moving. isPressed()booleaninherited
- Check if the sprite is pressed
Returns:
Type Description boolean True if the sprite is pressed - Loads the enemy bitmap
Name Type Description name
string The enemy bitmap's filename mainSprite()Sprite_Battlerinherited
- Get the main battler sprite
Returns:
Type Description Sprite_Battler The main battler sprite move(x, y)inherited
- Sets the x and y coordiantes of the sprite
Name Type Description x
number The x coordinate of the sprite y
number The 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
- Resets the sprite to normal
- Set the battler to a new battler
Name Type Description battler
Game_Battler The new battler for the sprite setBlendColor(color)inherited
- Sets the blend color for the sprite
Name Type Description color
array The blend color [r, g, b, a] setColorTone(tone)inherited
- Sets the color tone for the sprite
Name Type Description tone
array The color tone [r, g, b, gray] setFrame(x, y, width, height)inherited
- Sets the rectagle of the bitmap that the sprite displays
Name Type Description x
number The x coordinate of the frame y
number The y coordinate of the frame width
number The width of the frame height
number The height of the frame setHome(x, y)inherited
- Set the sprite's home
Name Type Description x
number The X value for the sprite's home y
number The Y value for the sprite's home - Sets the hue rotation value
Name Type Description hue
number The hue value (-360, 360) setupDamagePopup()inherited
- Sets up a damage popup sprite
- Sets up an effect for the enemy sprite
show()inherited
- Removes the "hidden" state of the sprite, making it visible
- Starts the appear effect
- Starts the blink effect
- Starts the boss collapse effect
- Starts the collapse effect
- Starts the disappear effect
- Starts an effect
Name Type Description effectType
string The type of effect to start - Starts the instant collapse effect
startMove(x, y, duration)inherited
- Starts a movement for the sprite
Name Type Description x
number The target x offset for the sprite y
number The target y offset for the sprite duration
number The duration of the movement in frames - Starts the whiten effect
- Updates the sprite for each frame
- Updates the appear effect
- Update the sprite's bitmap
- Updates the blink effect
- Updates the boss collapse effect
- Updates the collapse effect
updateDamagePopup()inherited
- Update the sprite's damage popups
- Updates the disappear effect
- Updates the sprite's effect
- Update the sprite's frame
- Updates the instant collapse effect
updateMain()inherited
- Update the main elements of the sprite
updateMove()inherited
- Update sprite movement
- Update the sprite's position
updateSelectionEffect()inherited
- Update the selection effect for the sprite
- Updates the state icon sprite
updateVisibility()inherited
- Updates the visibility status of the sprite
- Updates the whiten effect