Component_MoveAnimation Class
Executes a move-animation on a game-object.
Item Index
Methods
Properties
Methods
colorTo
-
color
-
duration
-
easingType
-
[callback]
Starts the color-animation.
Parameters:
-
color
ColorThe target color.
-
duration
NumberThe duration in frames.
-
easingType
ObjectThe easing-type.
-
[callback]
Function optionalAn optional callback-function called when the animation is finished.
move
-
speedX
-
speedY
-
duration
-
easingType
-
[callback]
Moves the game object with a specified speed.
Parameters:
-
speedX
NumberThe speed on x-axis in pixels per frame.
-
speedY
NumberThe speed on y-axis in pixels per frame.
-
duration
NumberThe duration in frames.
-
easingType
ObjectThe easing-type used for the animation.
-
[callback]
Function optionalAn optional callback-function called when the animation is finished.
moveIn
-
x
-
y
-
type
-
duration
-
easingType
-
[callback]
Lets a game object appear on screen from left, top, right or bottom using a move-animation
Parameters:
-
x
NumberThe x-coordinate of the target-position.
-
y
NumberThe y-coordinate of the target-position.
-
type
NumberThe movement-direction from where the game object should move-in.
-
duration
NumberThe duration in frames.
-
easingType
ObjectThe easing-type.
-
[callback]
Function optionalAn optional callback-function called when the animation is finished.
moveOut
-
type
-
duration
-
easingType
-
[callback]
Lets a game object disappear from screen to the left, top, right or bottom using a move-animation
Parameters:
-
type
NumberThe movement-direction in which the game object should move-out.
-
duration
NumberThe duration in frames.
-
easingType
ObjectThe easing-type.
-
[callback]
Function optionalAn optional callback-function called when the animation is finished.
moveTo
-
x
-
y
-
duration
-
easingType
-
[callback]
Moves the game object to a specified position.
Parameters:
-
x
NumberThe x-coordinate of the position.
-
y
NumberThe y-coordinate of the position.
-
duration
NumberThe duration in frames.
-
easingType
ObjectThe easing-type.
-
[callback]
Function optionalAn optional callback-function called when the animation is finished.
scroll
-
speedX
-
speedY
-
duration
-
easingType
-
[callback]
Scrolls the game object's content with a specified speed if supported.
Parameters:
-
speedX
NumberThe speed on x-axis in pixels per frame.
-
speedY
NumberThe speed on y-axis in pixels per frame.
-
duration
NumberThe duration in frames.
-
easingType
ObjectThe easing-type used for the animation.
-
[callback]
Function optionalAn optional callback-function called when the animation is finished.
scrollTo
-
x
-
y
-
duration
-
easingType
-
[callback]
Scrolls the game object to a specified position.
Parameters:
-
x
NumberThe x-coordinate of the position.
-
y
NumberThe y-coordinate of the position.
-
duration
NumberThe duration in frames.
-
easingType
ObjectThe easing-type.
-
[callback]
Function optionalAn optional callback-function called when the animation is finished.
toDataBundle
()
Serializes the move-animation into a data-bundle.
toDataBundle
()
Serializes the color-animation into a data-bundle.
update
()
Updates the color-animation
update
()
Updates the move-animation.
updateCoordinates
()
protected
Updates the game object's coordinates depending on animation type.
Properties
animationType
gs.MoveAnimationType
The move-animation type (move-in, move-out, etc.).
easing
gs.Easing
The easing-object used for the animation.
easing
gs.Easing
The easing-object used for the animation.
sourceColor
gs.Color
protected
The start-color.
targetColor
gs.Color
protected
The end-color.