Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
LightControl.cs
Go to the documentation of this file.
1
using
UnityEngine;
2
3
[ExecuteInEditMode]
4
public
class
LightControl
: MonoBehaviour
5
{
6
public
bool
enableLight
=
true
;
7
8
public
bool
enableHaze
=
true
;
9
10
public
float
lightRange
= 300f;
11
12
public
float
lightIntensity
= 1f;
13
14
[
Range
(0f, 255f)]
15
public
float
hazeLevel
= 120f;
16
17
[HideInInspector]
18
public
Light
particleLight
;
19
20
[HideInInspector]
21
public
GameObject
Haze
;
22
23
private
ParticleSystem.MainModule
partcleMain
;
24
25
private
ParticleSystem.LightsModule
lightPart
;
26
27
private
void
Start
()
28
{
29
}
30
31
private
void
OnEnable
()
32
{
33
partcleMain
=
Haze
.GetComponent<ParticleSystem>().main;
34
lightPart
=
particleLight
.transform.parent.gameObject.GetComponent<ParticleSystem>().lights;
35
}
36
37
private
void
Update
()
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
}
47
}
AttackSource.Range
@ Range
FOWType.Color
@ Color
SkinType.Light
@ Light
LightControl
Definition:
LightControl.cs:5
LightControl.Haze
GameObject Haze
Definition:
LightControl.cs:21
LightControl.particleLight
Light particleLight
Definition:
LightControl.cs:18
LightControl.Start
void Start()
Definition:
LightControl.cs:27
LightControl.lightPart
ParticleSystem.LightsModule lightPart
Definition:
LightControl.cs:25
LightControl.lightRange
float lightRange
Definition:
LightControl.cs:10
LightControl.Update
void Update()
Definition:
LightControl.cs:37
LightControl.enableLight
bool enableLight
Definition:
LightControl.cs:6
LightControl.lightIntensity
float lightIntensity
Definition:
LightControl.cs:12
LightControl.hazeLevel
float hazeLevel
Definition:
LightControl.cs:15
LightControl.partcleMain
ParticleSystem.MainModule partcleMain
Definition:
LightControl.cs:23
LightControl.OnEnable
void OnEnable()
Definition:
LightControl.cs:31
LightControl.enableHaze
bool enableHaze
Definition:
LightControl.cs:8
Elin
LightControl.cs
Generated by
1.9.6