void Start() { try { foreach (var item in PrevGameObjects) { PrevCircuitComponents.Add(item.GetComponent <ICircuitComponent>()); } foreach (var item in NextGameObjects) { NextCircuitComponents.Add(item.GetComponent <ICircuitComponent>()); } } catch (Exception) { Debug.Log("CircuitComponent List has a none ICircuitComponent."); } UPlayer = UnityEngine.Object.FindObjectOfType(typeof(UniquePlayerCTRL)) as UniquePlayerCTRL; _cameraController = UnityEngine.Object.FindObjectOfType(typeof(PlayerCameraController)) as PlayerCameraController; _mySR = GetComponentInParent <SpriteRenderer>(); SetHighlight(false); }
void Start() { UniquePlayerCTRL = Object.FindObjectOfType(typeof(UniquePlayerCTRL)) as UniquePlayerCTRL; CameraController = Object.FindObjectOfType(typeof(PlayerCameraController)) as PlayerCameraController; }