1 using System.Collections.Generic;
5 namespace droid.Runtime.Utilities.GameObjects.NeodroidCamera {
11 [SerializeField]
bool _automatically_add_lights_without_infrared_component =
false;
12 [SerializeField]
bool _ignore_infrared_if_empty =
true;
14 [SerializeField] Light[] _lights_to_ignore = null;
18 if (this._lights_to_ignore == null
19 || this._lights_to_ignore.Length == 0 &&
this._ignore_infrared_if_empty) {
20 var infrared_light_sources = FindObjectsOfType<InfraredLightSource>();
21 var lights =
new List<Light>();
22 foreach (var ils
in infrared_light_sources) {
23 lights.Add(ils.GetComponent<Light>());
26 this._lights_to_ignore = lights.ToArray();
27 }
else if (this._automatically_add_lights_without_infrared_component) {
28 var lights = this._lights_to_ignore.ToList();
29 var d = FindObjectsOfType<Light>();
30 foreach (var light1
in d) {
32 if (!lights.Exists(l => l != null && light1.GetHashCode() == l.GetHashCode())) {
38 this._lights_to_ignore = lights.ToArray();
46 if (this._lights_to_ignore != null) {
47 foreach (var l
in this._lights_to_ignore) {
56 if (this._lights_to_ignore != null) {
57 foreach (var l
in this._lights_to_ignore) {
66 if (this._lights_to_ignore != null) {
67 foreach (var l
in this._lights_to_ignore) {