Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
LightControl2.cs
Go to the documentation of this file.
1
using
UnityEngine;
2
3
[ExecuteInEditMode]
4
public
class
LightControl2
: 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
= 200f;
16
17
[HideInInspector]
18
public
Light
particleLight
;
19
20
private
ParticleSystem.TrailModule
partcleTrail
;
21
22
private
ParticleSystem.LightsModule
lightPart
;
23
24
private
void
Start
()
25
{
26
}
27
28
private
void
OnEnable
()
29
{
30
partcleTrail
= base.gameObject.GetComponent<ParticleSystem>().trails;
31
lightPart
=
particleLight
.transform.parent.gameObject.GetComponent<ParticleSystem>().lights;
32
}
33
34
private
void
Update
()
35
{
36
partcleTrail.enabled =
enableHaze
;
37
lightPart.enabled =
enableLight
;
38
particleLight.range =
lightRange
;
39
particleLight.intensity =
lightIntensity
;
40
Color
color =
partcleTrail
.colorOverLifetime.color;
41
color.a =
hazeLevel
/ 255f;
42
partcleTrail.colorOverLifetime = color;
43
}
44
}
AttackSource.Range
@ Range
FOWType.Color
@ Color
SkinType.Light
@ Light
LightControl2
Definition:
LightControl2.cs:5
LightControl2.enableHaze
bool enableHaze
Definition:
LightControl2.cs:8
LightControl2.lightIntensity
float lightIntensity
Definition:
LightControl2.cs:12
LightControl2.Start
void Start()
Definition:
LightControl2.cs:24
LightControl2.hazeLevel
float hazeLevel
Definition:
LightControl2.cs:15
LightControl2.enableLight
bool enableLight
Definition:
LightControl2.cs:6
LightControl2.Update
void Update()
Definition:
LightControl2.cs:34
LightControl2.particleLight
Light particleLight
Definition:
LightControl2.cs:18
LightControl2.lightPart
ParticleSystem.LightsModule lightPart
Definition:
LightControl2.cs:22
LightControl2.partcleTrail
ParticleSystem.TrailModule partcleTrail
Definition:
LightControl2.cs:20
LightControl2.lightRange
float lightRange
Definition:
LightControl2.cs:10
LightControl2.OnEnable
void OnEnable()
Definition:
LightControl2.cs:28
Elin
LightControl2.cs
Generated by
1.9.6