Terrain Engine 2D  1.10
A 2D Block Engine
TerrainEngine2D.Lighting.FloodLight Class Reference

Light generated by flood filling More...

Inheritance diagram for TerrainEngine2D.Lighting.FloodLight:
TerrainEngine2D.Lighting.LightSource

Public Attributes

int BlockLightTransfer = 3
 The amount of blocks the light can pass through More...
 
- Public Attributes inherited from TerrainEngine2D.Lighting.LightSource
Color LightColor = new Color32(237, 231, 217, 173)
 Color of the light source More...
 
int LightRadius = 10
 Distance light can travel More...
 
int SmoothingIterations
 Number of points to average across the light mesh for smoothing More...
 
float FlickerRate = 0
 Speed of light flickering More...
 
float FlickerRateVary = 0.1f
 Amount the flicker light rate varies More...
 
float FlickerScalingRadius = 0.1f
 The flicker scaling radius More...
 

Protected Member Functions

override void Start ()
 
override void CalculateLighting ()
 Calculate the light points More...
 
override void SmoothPoints ()
 Smooth the light mesh points by point averaging More...
 
override void CreateMesh ()
 Add the light points to the mesh More...
 
- Protected Member Functions inherited from TerrainEngine2D.Lighting.LightSource
virtual void OnEnable ()
 
virtual void Awake ()
 
virtual void LateUpdate ()
 
void UpdateMesh ()
 Update the light mesh More...
 
Vector2 AngleToDirection (float angleInDegrees, bool globalAngle)
 Converts a given angle in degrees to a direction More...
 

Additional Inherited Members

- Public Member Functions inherited from TerrainEngine2D.Lighting.LightSource
void UpdateLight ()
 Update the light mesh More...
 
- Protected Attributes inherited from TerrainEngine2D.Lighting.LightSource
World world
 
List< Vector2 > lightPoints
 
Mesh mesh
 
List< Vector3 > vertices
 
List< int > triangles
 
List< Vector2 > uvs
 
List< Color32 > colors32
 
- Properties inherited from TerrainEngine2D.Lighting.LightSource
bool Dynamic [get]
 Update the light dynamically More...
 

Detailed Description

Light generated by flood filling

Member Function Documentation

◆ CalculateLighting()

override void TerrainEngine2D.Lighting.FloodLight.CalculateLighting ( )
protectedvirtual

Calculate the light points

Reimplemented from TerrainEngine2D.Lighting.LightSource.

◆ CreateMesh()

override void TerrainEngine2D.Lighting.FloodLight.CreateMesh ( )
protectedvirtual

Add the light points to the mesh

Reimplemented from TerrainEngine2D.Lighting.LightSource.

◆ SmoothPoints()

override void TerrainEngine2D.Lighting.FloodLight.SmoothPoints ( )
protectedvirtual

Smooth the light mesh points by point averaging

Reimplemented from TerrainEngine2D.Lighting.LightSource.

◆ Start()

override void TerrainEngine2D.Lighting.FloodLight.Start ( )
protectedvirtual

Member Data Documentation

◆ BlockLightTransfer

int TerrainEngine2D.Lighting.FloodLight.BlockLightTransfer = 3

The amount of blocks the light can pass through


The documentation for this class was generated from the following file: