Camera.getLayer()

   
Type function
Library wattageTileEngine.Camera.*
Return value Number
Keywords Wattage, Layer, TileLayer, EntityLayer
See also  

Overview

This function returns the index of the layer which the camera is currently focused on. The layer which the camera is focused on will have a scaling factor of one.

Syntax

Camera.getLayer()

Examples

-- tileEngineViewControl is an instance of ViewControl
local camera = tileEngineViewControl.getCamera()
local curLayerIndex = camera.getLayer()