private void DestroyAnimation()
    {
        transform.position = Vector3.Lerp(transform.position, absorbTarget, Time.deltaTime);
        if (transform.position.DistanceGreaterThan(0.7f, absorbTarget))
        {
            return;
        }

        foreach (MeshRenderer meshRenderer in meshRenderers)
        {
            // Check if the material has the correct property
            if (!meshRenderer.material.HasProperty(stateMaterialProperty))
            {
                continue;
            }

            meshRenderer.material.SetFloat(stateMaterialProperty, dissolveState); // Continue animation
            baseController.ArcLengthVFX(transform, 1 - dissolveState);

            // If the animation is finished
            if (meshRenderers[0].material.GetFloat(stateMaterialProperty)
                / meshRenderers[0].material.GetFloat(rateMaterialProperty)
                > 1)
            {
                baseController.crystals++;
                baseController.RemoveRayVFX(transform, 10f);

                //Add resources to inventory
                inventory.ResourceAmount += lootValue;

                Destroy(gameObject);
            }
        }

        dissolveState += Time.deltaTime;
    }