Example #1
0
 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>();
 }
Example #2
0
    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>();
    }
Example #3
0
 private void Start()
 {
     source = GetComponent <AudioSource>();
     gas    = FindObjectOfType <GlobalAlertSystem>();
 }
Example #4
0
 // Start is called before the first frame update
 void Start()
 {
     player = FindObjectOfType <PlayerController>().gameObject;
     beam   = GetComponentInChildren <SpotlightRenderer>();
     gas    = FindObjectOfType <GlobalAlertSystem>();
 }