void Awake() { _cameraFollower = Camera.main.GetComponent <Follower>(); _interactionRange = GetComponentInChildren <TriggerDetection>(); _switchManager = FindObjectOfType <SwitchManager>(); _weapons = GetComponents <BasicWeapon>().ToList(); }
void Awake() { FollowOnSight.Target = transform; _driver = FindObjectOfType <DriverController>(); _driver.gameObject.SetActive(false); _turret = GetComponentInChildren <TurretController>(); _landingZones = GetComponentsInChildren <TriggerDetection>().ToList(); _cameraFollower = Camera.main.GetComponent <Follower>(); var interactible = GetComponent <Interactible>(); interactible.OnInteraction += ActivateCar; _wheels = GetComponentsInChildren <WheelRotation>(); _switchManager = FindObjectOfType <SwitchManager>(); }