Class: Sprite_Damage

Sprite_Damage

new Sprite_Damage()

The sprite for displaying a popup damage.

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

opacitynumberinheritedoverrides

The opacity of the sprite (0 to 255)

widthnumberinherited

The width of the sprite without the scale

Methods

createBitmap(width, height)Bitmap

Creates a bitmap with font, text color, and outline settings
NameTypeDescription
widthnumberThe width of the bitmap
heightnumberThe height of the bitmap
Returns:
TypeDescription
BitmapThe bitmap that was created

createChildSprite(width, height)Sprite

Creates a child sprite of a given width and height
NameTypeDescription
widthnumberThe width of the child sprite
heightnumberThe height of the child sprite
Returns:
TypeDescription
SpriteThe child sprite that was created

createDigits(value)

Creates the numbers that are part of the damage popup
NameTypeDescription
valuenumberThe number to turn into damage popup digits
Creates the miss damage popup text

damageColor()string

Gets the color to use for the damage color
Returns:
TypeDescription
stringThe color string in hex format
Destroys the sprite

fontFace()string

Gets the font face to use
Returns:
TypeDescription
stringThe font face to use

fontSize()number

Gets the font size to use
Returns:
TypeDescription
numberThe font size to use

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]
Makes the sprite "hidden" (not visible)
Initializes the sprite
NameTypeDescription
bitmapBitmapThe bitmap of the sprite

isPlaying()boolean

Check if the damage popup is currently playing
Returns:
TypeDescription
booleanTrue if currently playing
Sets the x and y coordiantes of the sprite
NameTypeDescription
xnumberThe x coordinate of the sprite
ynumberThe y coordinate of the sprite

outlineColor()string

Gets the color to use for the outline
Returns:
TypeDescription
stringThe color string, by default rgba format

outlineWidth()number

Gets the outline width
Returns:
TypeDescription
numberThe width of the outline

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

setup(target)

Sets the sprite up
NameTypeDescription
targetGame_BattlerThe target to show the damage sprite for

setupCriticalEffect()

Sets the sprite's critical effect variables
Removes the "hidden" state of the sprite, making it visible
Updates the sprite for each frame

updateChild(sprite)

Updates a child sprite
NameTypeDescription
spriteSpriteThe child sprite to update
Updates the flash effect

updateOpacity()

Updates the opacity

updateVisibility()inherited

Updates the visibility status of the sprite