Animation Class
Module: Animation
Class for animating GameObject
's to desired state
Constructor
Animation
(
-
parent
-
time
-
[options]
Parameters:
-
parent
GameObjectParent in render tree
-
time
Inttime in miliseconds
-
[options]
Object optionaloptions of Animation
Example:
var world = new Scene()
var gameobject = new GameObject(world,{})
var ani = new Animation(gameobject, 500, {
x: planet.x + Math.sin(this.angle * Math.degToRad) * (pll - 1),
y: planet.y + Math.cos(this.angle * Math.degToRad) * (pll - 1),
onComplete: function (e) {
e.remove()
}
})
ani.run()