Familiar territory. Sprite keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.
The basic object that is rendered to the game screen.
function Sprite()
Quick Reference
Setup & Creation 2
| initialize() | Sets up a new instance. |
| _createColorFilter() | Creates the color filter. |
Getting Information 2
| getBlendColor() | Gets the blend color for the sprite. |
| getColorTone() | Gets the color tone for the sprite. |
Actions 8
| destroy() | Destroys the sprite. |
| hide() | Makes the sprite "hidden". |
| show() | Releases the "hidden" state of the sprite. |
| move() | Sets the x and y at once. |
| setFrame() | Sets the rectagle of the bitmap that the sprite displays. |
| setHue() | Sets the hue rotation value. |
| setBlendColor() | Sets the blend color for the sprite. |
| setColorTone() | Sets the color tone for the sprite. |
Events, Commands & Input 2
| _onBitmapChange() | Called when bitmap change happens. |
| _onBitmapLoad() | Called when bitmap load happens. |
Updating & Drawing 4
| update() | Updates the sprite for each frame. |
| updateVisibility() | Reflects the "hidden" state of the sprite to the visible state. |
| _refresh() | Refresh. |
| _updateColorFilter() | Updates the color filter each frame. |
Setup & Creation
initialize
method sourceSprite.prototype.initialize(bitmap)
Sets up a new instance. (Same as the RPG Maker MZ method of this name.)
_createColorFilter
method internal sourceSprite.prototype._createColorFilter()
Creates the color filter. (Same as the RPG Maker MZ method of this name.)
Getting Information
getBlendColor
method sourceSprite.prototype.getBlendColor()
Gets the blend color for the sprite.
Details
Gets the blend color for the sprite.
getColorTone
method sourceSprite.prototype.getColorTone()
Gets the color tone for the sprite.
Details
Gets the color tone for the sprite.
Actions
destroy
method sourceSprite.prototype.destroy()
Destroys the sprite.
hide
method sourceSprite.prototype.hide()
Makes the sprite "hidden".
show
method sourceSprite.prototype.show()
Releases the "hidden" state of the sprite.
move
method sourceSprite.prototype.move(x, y)
Sets the x and y at once.
Details
Sets the x and y at once.
setFrame
method sourceSprite.prototype.setFrame(x, y, width, height)
Sets the rectagle of the bitmap that the sprite displays.
Details
Sets the rectagle of the bitmap that the sprite displays.
setHue
method sourceSprite.prototype.setHue(hue)
Sets the hue rotation value.
Details
Sets the hue rotation value.
setBlendColor
method sourceSprite.prototype.setBlendColor(color)
Sets the blend color for the sprite.
Details
Sets the blend color for the sprite.
setColorTone
method sourceSprite.prototype.setColorTone(tone)
Sets the color tone for the sprite.
Details
Sets the color tone for the sprite.
Events, Commands & Input
_onBitmapChange
method internal sourceSprite.prototype._onBitmapChange()
Called when bitmap change happens. (Same as the RPG Maker MZ method of this name.)
_onBitmapLoad
method internal sourceSprite.prototype._onBitmapLoad(bitmapLoaded)
Called when bitmap load happens. (Same as the RPG Maker MZ method of this name.)
Updating & Drawing
update
method sourceSprite.prototype.update()
Updates the sprite for each frame.
updateVisibility
method sourceSprite.prototype.updateVisibility()
Reflects the "hidden" state of the sprite to the visible state.
_refresh
method internal sourceSprite.prototype._refresh()
Refresh. (Same as the RPG Maker MZ method of this name.)
_updateColorFilter
method internal sourceSprite.prototype._updateColorFilter()
Updates the color filter each frame. (Same as the RPG Maker MZ method of this name.)