void Start() { lazor = gameObject.AddComponent(typeof(LineRenderer)) as LineRenderer; lazor.startWidth = 0.02f; lazor.endWidth = 0.02f; lazor.material = material; beamEnd.SetActive(false); currentLookLocation = transform.up; nextLookLocation = 0; gas = FindObjectOfType <GlobalAlertSystem>(); audioSource = GetComponent <AudioSource>(); }
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>(); }
private void Start() { source = GetComponent <AudioSource>(); gas = FindObjectOfType <GlobalAlertSystem>(); }
// Start is called before the first frame update void Start() { player = FindObjectOfType <PlayerController>().gameObject; beam = GetComponentInChildren <SpotlightRenderer>(); gas = FindObjectOfType <GlobalAlertSystem>(); }