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

A light generated by raycasting randomly More...

Inheritance diagram for TerrainEngine2D.Lighting.RaycastLight:
TerrainEngine2D.Lighting.LightSource TerrainEngine2D.Lighting.AdvancedRaycastLight

Public Attributes

float LightAngle = 360
 The lights field of view angle More...
 
LayerMask ObstacleMask
 Objects which the light More...
 
float EdgeLightBleed = 0
 Amount of light that bleeds into the terrain More...
 
float Resolution = 0.2f
 The amount of light rays per degree 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 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 Start ()
 
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

A light generated by raycasting randomly

Member Function Documentation

◆ CalculateLighting()

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

Calculate the light points

Reimplemented from TerrainEngine2D.Lighting.LightSource.

◆ CreateMesh()

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

Add the light points to the mesh

Reimplemented from TerrainEngine2D.Lighting.LightSource.

◆ SmoothPoints()

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

Smooth the light mesh points by point averaging

Reimplemented from TerrainEngine2D.Lighting.LightSource.

Member Data Documentation

◆ EdgeLightBleed

float TerrainEngine2D.Lighting.RaycastLight.EdgeLightBleed = 0

Amount of light that bleeds into the terrain

◆ LightAngle

float TerrainEngine2D.Lighting.RaycastLight.LightAngle = 360

The lights field of view angle

◆ ObstacleMask

LayerMask TerrainEngine2D.Lighting.RaycastLight.ObstacleMask

Objects which the light

◆ Resolution

float TerrainEngine2D.Lighting.RaycastLight.Resolution = 0.2f

The amount of light rays per degree


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