Elin Modding Docs Doc
Loading...
Searching...
No Matches
LightControl.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000124 RID: 292
5[ExecuteInEditMode]
6public class LightControl : MonoBehaviour
7{
8 // Token: 0x060007E3 RID: 2019 RVA: 0x0003320A File Offset: 0x0003140A
9 private void Start()
10 {
11 }
12
13 // Token: 0x060007E4 RID: 2020 RVA: 0x0003320C File Offset: 0x0003140C
14 private void OnEnable()
15 {
16 this.partcleMain = this.Haze.GetComponent<ParticleSystem>().main;
17 this.lightPart = this.particleLight.transform.parent.gameObject.GetComponent<ParticleSystem>().lights;
18 }
19
20 // Token: 0x060007E5 RID: 2021 RVA: 0x0003324C File Offset: 0x0003144C
21 private void Update()
22 {
23 this.Haze.SetActive(this.enableHaze);
24 this.lightPart.enabled = this.enableLight;
25 this.particleLight.range = this.lightRange;
26 this.particleLight.intensity = this.lightIntensity;
27 Color color = this.partcleMain.startColor.color;
28 color.a = this.hazeLevel / 255f;
29 this.partcleMain.startColor = color;
30 }
31
32 // Token: 0x04000810 RID: 2064
33 public bool enableLight = true;
34
35 // Token: 0x04000811 RID: 2065
36 public bool enableHaze = true;
37
38 // Token: 0x04000812 RID: 2066
39 public float lightRange = 300f;
40
41 // Token: 0x04000813 RID: 2067
42 public float lightIntensity = 1f;
43
44 // Token: 0x04000814 RID: 2068
45 [Range(0f, 255f)]
46 public float hazeLevel = 120f;
47
48 // Token: 0x04000815 RID: 2069
49 [HideInInspector]
50 public Light particleLight;
51
52 // Token: 0x04000816 RID: 2070
53 [HideInInspector]
54 public GameObject Haze;
55
56 // Token: 0x04000817 RID: 2071
57 private ParticleSystem.MainModule partcleMain;
58
59 // Token: 0x04000818 RID: 2072
60 private ParticleSystem.LightsModule lightPart;
61}