Kiwi.CameraManager Class
Used to handle the creation and management of Cameras on a Game. Each Game will always have created for it a CameraManager and a default Camera on the manager. Games currently only usupport the use of a single camera, the default camera. Much of this class has been written with future multiple camera support in mind.
Constructor
Item Index
Properties
Methods
boot
()
public
Initializes the CameraManager, creates a new camera and assigns it to the defaultCamera
objType
()
String
public
Returns the type of this object
Returns:
"CameraManager"
remove
-
camera
Removes the given camera, if it is present in the camera managers camera collection.
Parameters:
-
camera
Kiwi.Camera
Returns:
True if the camera was removed, false otherwise.
removeAll
()
public
Removes all cameras in the camera Manager except the default camera. Does nothing if in multi camera mode.
render
()
public
Calls the render method on all the cameras
update
()
public
Calls update on all the cameras.
zeroAllCameras
()
public
Returns all cameras to origin. Called when starting a new state.
Properties
_cameras
Array
private
A collection of cameras
_nextCameraID
Number
private
The id which will be used when next creating a camera
defaultCamera
Kiwi.Camara
public
The default camera that is on this manager.