Class: Game_Picture

Game_Picture

new Game_Picture()

The game object class for a picture.

Methods

angle()number

Get the picture's angle
Returns:
TypeDescription
numberThe picture's angle

applyEasing(current, target)number

Applies easing for picture movements
NameTypeDescription
currentnumberThe current picture state
targetnumberThe target picture state
Returns:
TypeDescription
numberThe calculated value between current and target values

blendMode()number

Get the picture's blend mode
Returns:
TypeDescription
numberThe picture's blend mode

calcEasing(t)number

Calculates the easing amount
NameTypeDescription
tnumberThe amount of easing to calculate given current state
Returns:
TypeDescription
numberThe calculated easing value

easeIn(t, exponent)number

Calculates the easing amount for slow start
NameTypeDescription
tnumberThe amount of easing to calculate given current state
exponentnumberThe exponent to apply
Returns:
TypeDescription
numberThe calculated easing value

easeInOut(t, exponent)number

Calculates the easing amount for slow start and end
NameTypeDescription
tnumberThe amount of easing to calculate given current state
exponentnumberThe exponent to apply
Returns:
TypeDescription
numberThe calculated easing value

easeOut(t, exponent)number

Calculates the easing amount for slow end
NameTypeDescription
tnumberThe amount of easing to calculate given current state
exponentnumberThe exponent to apply
Returns:
TypeDescription
numberThe calculated easing value
Initialize basic properties of the picture object

initRotation()

Initialize the picture's rotation
Initialize target properties of the picture object
Initialize the picture's tone

initialize()

Initialize the picture game object

move(origin, x, y, scaleX, scaleY, opacity, blendMode, duration, easingType)

Moves the picture with options
NameTypeDescription
originnumberThe picture origin
xnumberThe picture x coordinate
ynumberThe picture y coordinate
scaleXnumberThe x (horizontal) scale of the picture
scaleYnumberThe y (vertical) scale of the picture
opacitynumberThe opacity of the picture
blendModenumberThe blend mode of the picture
durationnumberThe duration of the move
easingTypenumberThe easing type of the move

name()string

Get the picture image file name
Returns:
TypeDescription
stringThe picture's image file name

opacity()number

Get the picture's opacity
Returns:
TypeDescription
numberThe picture's opacity

origin()number

Get the picture's origin
Returns:
TypeDescription
numberThe picture's origin

rotate(speed)

Rotates the picture
NameTypeDescription
speednumberThe speed of the rotation

scaleX()number

Get the picture's x scale
Returns:
TypeDescription
numberThe picture's x scale

scaleY()number

Get the picture's y scale
Returns:
TypeDescription
numberThe picture's y scale

show(name, origin, x, y, scaleX, scaleY, opacity, blendMode)

Shows the picture with options
NameTypeDescription
namestringThe picture image file name
originnumberThe picture origin
xnumberThe picture x coordinate
ynumberThe picture y coordinate
scaleXnumberThe x (horizontal) scale of the picture
scaleYnumberThe y (vertical) scale of the picture
opacitynumberThe opacity of the picture
blendModenumberThe blend mode of the picture

tint(tone, duration)

Sets the picture's tint over a given duration
NameTypeDescription
toneArray.<number>The new tone of the picture
durationnumberThe duration over which to change the tone

tone()Array.<number> | null

Get the picture's tone
Returns:
TypeDescription
Array.<number>|nullThe picture's tone
Update the picture
Update moving the picture

updateRotation()

Update the picture rotation
Update the picture tone
Get the picture's x coordinate
Returns:
TypeDescription
numberThe picture's x coordinate
Get the picture's y coordinate
Returns:
TypeDescription
numberThe picture's y coordinate