Removes the given Camera, or an array of Cameras, from this Camera Manager.
If found in the Camera Manager it will be immediately removed from the local cameras array. If also currently the 'main' camera, 'main' will be reset to be camera 0.
The removed Cameras are automatically destroyed if the runDestroy
argument is true
, which is the default.
If you wish to re-use the cameras then set this to false
, but know that they will retain their references
and internal data until destroyed or re-added to a Camera Manager.
name | type | arguments | Default | description |
---|---|---|---|---|
camera | Phaser.Cameras.Scene2D.Camera | Array.<Phaser.Cameras.Scene2D.Camera> |
The Camera, or an array of Cameras, to be removed from this Camera Manager. |
||
runDestroy | boolean | <optional> | true |
Automatically call |
The total number of Cameras removed.