Camera.setLayer()
Type | function |
Library | wattageTileEngine.Camera.* |
Return value | VOID |
Keywords | Wattage, Layer, TileLayer, EntityLayer |
See also |
Overview
This function sets the index of the layer which the camera will focus on. The layer which the camera is focused on will have a scaling factor of one.
Syntax
Camera.setLayer( index )
index (required)
Number. The index of the layer that the camera will focus on. This results in the specified layer having a scaling value of 1 and is useful when parallax is being used with multiple layers.
Examples
-- tileEngineViewControl is an instance of ViewControl
local camera = tileEngineViewControl.getCamera()
camera.setLayer(3)