Camera Class
Camera class represents DisplayObjectContainer, that autotrack one of DisplayObject positions.
Constructor
Camera
()
Example:
var stage = new PIXI.Stage();
var layers = new LINK.Layers("game","ui");
stage.addChild(layers);
var camera = new LINK.Camera();
camera.follow(player).on(layers.game);
Methods
follow
(
-
object
Starts follow on DisplayObject
Parameters:
-
object
DisplayObject
off
()
Unwraps DisplayObject that was wrapped by "on" method.
on
(
-
object
Wraps DisplayObject to pan him and all his childrens.
Parameters:
-
object
DisplayObjectContainer
updateTransform
()
Properties
bounds
PIXI.Rectangle
private
The bounds of that the camera can move to
freeze
Boolean
Freezes the camera
freeze
Boolean
private
Freezes the camera