LightingModel.getAggregateLightIfRowColumnOpaque()

   
Type function
Library wattageTileEngine.LightingModel.*
Return value Table
Keywords  
See also  

Overview

This function returns the aggregated red, green, and blue values of all the lights which affect an opaque tile. The location of the viewer is taken into account. If the specified row and column is not opaque, then nil is returned.

Syntax

LightingModel.getAggregateLightIfRowColumnOpaque( row, col, viewRow, viewCol )
row (required)

Number. Row of the tile.

col (required)

Number. Column of the tile.

viewRow (required)

Number. Row of the view point.

viewCol (required)

Number. Column of the view point.

Examples

local light = lightingModelInstance.getAggregateLightIfRowColumnOpaque(10, 15, 12, 17)
local red = light.r
local green = light.g
local blue = light.b