EntityLayer.setLightingMode()
Type | function |
Library | wattageTileEngine.EntityLayer.* |
Return value | VOID |
Keywords | |
See also |
Overview
This function will set the the lighting mode for this layer. The two modes available are:
- Ambient Only - Only ambient lighting applies to this layer.
- All - All lighting applies to this layer.
- None - No lighting is applied to this layer. The sprites are drawn “as is”.
There are constants defined for the modes:
local TileEngine = require "plugin.wattageTileEngine"
TileEngine.LayerConstants.LIGHTING_MODE_APPLY_ALL
TileEngine.LayerConstants.LIGHTING_MODE_AMBIENT_ONLY
TileEngine.LayerConstants.LIGHTING_MODE_NONE
The default mode is LIGHTING_MODE_APPLY_ALL.
Syntax
EntityLayer.setLightingMode( mode )
mode (required)
Number. The lighting mode for the layer.
Examples
local TileEngine = require "plugin.wattageTileEngine"
entityLayerInstance.setLightingMode(TileEngine.LayerConstants.LIGHTING_MODE_AMBIENT_ONLY)