void Start() { nextLookLocation = 0; currentLookLocation = cameraObject.transform.forward; if (inverse) { currentLookLocation = -currentLookLocation; } if (lookAtLocations.Length > 0) { currentLookLocation = lookAtLocations[0].position; } player = FindObjectOfType <PlayerController>().gameObject; beam = GetComponentInChildren <SpotlightRenderer>(); gas = FindObjectOfType <GlobalAlertSystem>(); audioSource = GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { player = FindObjectOfType <PlayerController>().gameObject; beam = GetComponentInChildren <SpotlightRenderer>(); gas = FindObjectOfType <GlobalAlertSystem>(); }