// ** Update Functions ** private void Start() { soundSource = GetComponent <LaserSound>(); //actualLaser = gameObject.GetComponentInChildren<KillBeam>(); actualLaser = gameObject.transform.Find("LaserBeam").GetComponent <KillBeam>(); laserTimer = gameObject.transform.Find("LaserCanvas").Find("LaserTimer").GetComponent <Image>(); time = maxTime; }
public string linkCode; // This must match the camera that triggers it //public Color laserColor; // ** Update Functions ** private void Awake() { actualLaser = gameObject.transform.Find("LaserBeam").GetComponent <KillBeam>(); indicator = gameObject.transform.Find("Indicator").GetComponent <SpriteRenderer>(); beam = gameObject.transform.Find("LaserBeam").GetComponent <SpriteRenderer>(); }