// Use this for initialization void Awake() { myCamera = GetComponent <Camera>(); // [PCG]: These would be generated lightDetectors = The_Helper.GetComponentsInScene <LightDetector>().ToList(); }
private void CheckForDebugInputs() { if (Input.GetKeyUp(KeyCode.Alpha1) && lightDetectors.Count > 0) { lightDetectors[0].UpdateCurrentColor(The_Helper.GetRandomColor()); } else if (Input.GetKeyUp(KeyCode.Alpha2) && lightDetectors.Count > 1) { lightDetectors[1].UpdateCurrentColor(The_Helper.GetRandomColor()); } else if (Input.GetKeyUp(KeyCode.Alpha3) && lightDetectors.Count > 2) { lightDetectors[2].UpdateCurrentColor(The_Helper.GetRandomColor()); } }