Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LightControl Class Reference
Inheritance diagram for LightControl:

Public Attributes

bool enableLight = true
 
bool enableHaze = true
 
float lightRange = 300f
 
float lightIntensity = 1f
 
float hazeLevel = 120f
 
Light particleLight
 
GameObject Haze
 

Private Member Functions

void Start ()
 
void OnEnable ()
 
void Update ()
 

Private Attributes

ParticleSystem.MainModule partcleMain
 
ParticleSystem.LightsModule lightPart
 

Detailed Description

Definition at line 4 of file LightControl.cs.

Member Function Documentation

◆ OnEnable()

void LightControl.OnEnable ( )
inlineprivate

Definition at line 31 of file LightControl.cs.

32 {
33 partcleMain = Haze.GetComponent<ParticleSystem>().main;
34 lightPart = particleLight.transform.parent.gameObject.GetComponent<ParticleSystem>().lights;
35 }
GameObject Haze
Definition: LightControl.cs:21
Light particleLight
Definition: LightControl.cs:18
ParticleSystem.LightsModule lightPart
Definition: LightControl.cs:25
ParticleSystem.MainModule partcleMain
Definition: LightControl.cs:23

References Haze, lightPart, partcleMain, and particleLight.

◆ Start()

void LightControl.Start ( )
inlineprivate

Definition at line 27 of file LightControl.cs.

28 {
29 }

◆ Update()

void LightControl.Update ( )
inlineprivate

Definition at line 37 of file LightControl.cs.

38 {
39 Haze.SetActive(enableHaze);
40 lightPart.enabled = enableLight;
41 particleLight.range = lightRange;
42 particleLight.intensity = lightIntensity;
43 Color color = partcleMain.startColor.color;
44 color.a = hazeLevel / 255f;
45 partcleMain.startColor = color;
46 }
float lightRange
Definition: LightControl.cs:10
bool enableLight
Definition: LightControl.cs:6
float lightIntensity
Definition: LightControl.cs:12
float hazeLevel
Definition: LightControl.cs:15
bool enableHaze
Definition: LightControl.cs:8

References Color, enableHaze, enableLight, Haze, hazeLevel, lightIntensity, lightRange, and partcleMain.

Member Data Documentation

◆ enableHaze

bool LightControl.enableHaze = true

Definition at line 8 of file LightControl.cs.

Referenced by Update().

◆ enableLight

bool LightControl.enableLight = true

Definition at line 6 of file LightControl.cs.

Referenced by Update().

◆ Haze

GameObject LightControl.Haze

Definition at line 21 of file LightControl.cs.

Referenced by OnEnable(), and Update().

◆ hazeLevel

float LightControl.hazeLevel = 120f

Definition at line 15 of file LightControl.cs.

Referenced by Update().

◆ lightIntensity

float LightControl.lightIntensity = 1f

Definition at line 12 of file LightControl.cs.

Referenced by Update().

◆ lightPart

ParticleSystem.LightsModule LightControl.lightPart
private

Definition at line 25 of file LightControl.cs.

Referenced by OnEnable().

◆ lightRange

float LightControl.lightRange = 300f

Definition at line 10 of file LightControl.cs.

Referenced by Update().

◆ partcleMain

ParticleSystem.MainModule LightControl.partcleMain
private

Definition at line 23 of file LightControl.cs.

Referenced by OnEnable(), and Update().

◆ particleLight

Light LightControl.particleLight

Definition at line 18 of file LightControl.cs.

Referenced by OnEnable().


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