void Start()
 {
     lightningBolt = new SC_LightningBolt(segmentLength, 0, startColour, endColour);
     lightningBolt.SetParent(gameObject);
     lightningBolt.Init(lightningStrength, lineRendererPrefab, lightRendererPrefab);
     lightningBolt.Activate();
 }
    void Start()
    {
        lightningBolt = new SC_LightningBolt(segmentLength, 0, startColour, endColour);
        lightningBolt.SetParent(gameObject);
        lightningBolt.Init(lightningStrength, lineRendererPrefab, lightRendererPrefab);
        lightningBolt.Activate();

        // Add collider for bounce detection
        bounceCollider = gameObject.AddComponent <SphereCollider> ();
        bounceCollider.transform.position = target.transform.position;
        bounceCollider.radius             = bounceRadius;
        bounceCollider.isTrigger          = true;

        // Add a rigidbody
        Rigidbody rigidBody = gameObject.AddComponent <Rigidbody> ();

        rigidBody.isKinematic = true;
        rigidBody.useGravity  = false;
    }