Class in reactor_core_display.js

Sprite

13 public functions in 4 groups · show internal (_) functions

The Database: everything Core loads at boot.

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.

@class
@extends
PIXI.Sprite
@param
bitmap Bitmap The image for the sprite.
function Sprite()

Quick Reference

Setup & Creation 1

initialize() Sets up a new instance.

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.

Updating & Drawing 2

update() Updates the sprite for each frame.
updateVisibility() Reflects the "hidden" state of the sprite to the visible state.

Setup & Creation

initialize

method source
Sprite.prototype.initialize(bitmap)

Sets up a new instance. (Same as the RPG Maker MZ method of this name.)

Getting Information

getBlendColor

method source
Sprite.prototype.getBlendColor()

Gets the blend color for the sprite.

Details

Gets the blend color for the sprite.

@returns
array The blend color [r, g, b, a].

getColorTone

method source
Sprite.prototype.getColorTone()

Gets the color tone for the sprite.

Details

Gets the color tone for the sprite.

@returns
array The color tone [r, g, b, gray].

Actions

destroy

method source
Sprite.prototype.destroy()

Destroys the sprite.

hide

method source
Sprite.prototype.hide()

Makes the sprite "hidden".

show

method source
Sprite.prototype.show()

Releases the "hidden" state of the sprite.

move

method source
Sprite.prototype.move(x, y)

Sets the x and y at once.

Details

Sets the x and y at once.

@param
x number The x coordinate of the sprite.
@param
y number The y coordinate of the sprite.

setFrame

method source
Sprite.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.

@param
x number The x coordinate of the frame.
@param
y number The y coordinate of the frame.
@param
width number The width of the frame.
@param
height number The height of the frame.

setHue

method source
Sprite.prototype.setHue(hue)

Sets the hue rotation value.

Details

Sets the hue rotation value.

@param
hue number The hue value (-360, 360).

setBlendColor

method source
Sprite.prototype.setBlendColor(color)

Sets the blend color for the sprite.

Details

Sets the blend color for the sprite.

@param
color array The blend color [r, g, b, a].

setColorTone

method source
Sprite.prototype.setColorTone(tone)

Sets the color tone for the sprite.

Details

Sets the color tone for the sprite.

@param
tone array The color tone [r, g, b, gray].

Updating & Drawing

update

method source
Sprite.prototype.update()

Updates the sprite for each frame.

updateVisibility

method source
Sprite.prototype.updateVisibility()

Reflects the "hidden" state of the sprite to the visible state.