// Use this for initialization void Start() { rb = GetComponent <Rigidbody>(); source = GetComponent <AudioSource>(); // find the "sight" collider child object scannerCollider = transform.Find("Sight").GetComponent <ShipScanner>(); }
void Start() { Parent = transform.parent.gameObject; Child_Gun = transform.GetChild(0).gameObject; bulletSpeed = Child_Gun.GetComponent <FixedGun>().projectileInitSpeed; Scanner = gameObject.GetComponent <ShipScanner>(); }