SlideToTop Class
Scene transition SlideToTop, move scene into top. An instance of this class is applied onto Game.push or Game.pop methods.
Example:
var scene = new Scene();
game.push(scene, new SlideToBottom());
Methods
draw
(
protected
canvas
Draw method draws new and old scene. Both scenes are translate on y-axis.
Parameters:
-
canvas
CanvasCurrent game canvas
init
() protected
Init instance.
setState
(
protected
value
Set transition state - current position of the scenes on y-axis
Parameters:
-
value
Integercurent position in the animation