Elin Modding Docs Doc
Loading...
Searching...
No Matches
LightControl2.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000125 RID: 293
5[ExecuteInEditMode]
6public class LightControl2 : MonoBehaviour
7{
8 // Token: 0x060007E7 RID: 2023 RVA: 0x0003330C File Offset: 0x0003150C
9 private void Start()
10 {
11 }
12
13 // Token: 0x060007E8 RID: 2024 RVA: 0x0003330E File Offset: 0x0003150E
14 private void OnEnable()
15 {
16 this.partcleTrail = base.gameObject.GetComponent<ParticleSystem>().trails;
17 this.lightPart = this.particleLight.transform.parent.gameObject.GetComponent<ParticleSystem>().lights;
18 }
19
20 // Token: 0x060007E9 RID: 2025 RVA: 0x0003334C File Offset: 0x0003154C
21 private void Update()
22 {
23 this.partcleTrail.enabled = this.enableHaze;
24 this.lightPart.enabled = this.enableLight;
25 this.particleLight.range = this.lightRange;
26 this.particleLight.intensity = this.lightIntensity;
27 Color color = this.partcleTrail.colorOverLifetime.color;
28 color.a = this.hazeLevel / 255f;
29 this.partcleTrail.colorOverLifetime = color;
30 }
31
32 // Token: 0x04000819 RID: 2073
33 public bool enableLight = true;
34
35 // Token: 0x0400081A RID: 2074
36 public bool enableHaze = true;
37
38 // Token: 0x0400081B RID: 2075
39 public float lightRange = 300f;
40
41 // Token: 0x0400081C RID: 2076
42 public float lightIntensity = 1f;
43
44 // Token: 0x0400081D RID: 2077
45 [Range(0f, 255f)]
46 public float hazeLevel = 200f;
47
48 // Token: 0x0400081E RID: 2078
49 [HideInInspector]
50 public Light particleLight;
51
52 // Token: 0x0400081F RID: 2079
53 private ParticleSystem.TrailModule partcleTrail;
54
55 // Token: 0x04000820 RID: 2080
56 private ParticleSystem.LightsModule lightPart;
57}