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