Привет добавь в скрипт чтобы после горения через 1 секунду если есть Fixed joint то он удалялся


using UnityEngine;

[RequireComponent(typeof(Renderer))]
public class WoodFireHandler : MonoBehaviour
{
    [Header("Fire Settings")]
    [SerializeField] private GameObject currentFire;

    [Header("Burn Effects")]
    [SerializeField, Range(0.1f, 5f)] private float burnSpeed = 0.5f;
    [SerializeField] private AnimationCurve burnCurve = AnimationCurve.Linear(0, 0, 1, 1);
    [SerializeField] private Color burnColor = Color.black;
    [SerializeField] private float emissionIntensity = 0.5f;

    private MaterialPropertyBlock _propBlock;
    private Renderer _renderer;
    private Color _originalColor;
    private float _originalEmission;
    private float _burnProgress;
    private static readonly int EmissionColor = Shader.PropertyToID("_EmissionColor");

    public bool IsOnFire { get; private set; }

    private void Awake()
    {
        _propBlock = new MaterialPropertyBlock();
        _renderer = GetComponent<Renderer>();

        // Сохраняем оригинальные параметры
        _originalColor = _renderer.sharedMaterial.color;
        if (_renderer.sharedMaterial.HasProperty(EmissionColor))
        {
            _originalEmission = _renderer.sharedMaterial.GetColor(EmissionColor).grayscale;
        }
    }

    public void SetOnFire(GameObject fireObject)
    {
        if (IsOnFire) return;

        IsOnFire = true;
        currentFire = fireObject;
        enabled = true;
    }

    private void Update()
    {
        if (!IsOnFire) return;

        _burnProgress = Mathf.Clamp01(_burnProgress + burnSpeed * Time.deltaTime);
        UpdateBurnEffect();

        if (_burnProgress >= 1f)
        {
            Extinguish();
        }
    }

    private void UpdateBurnEffect()
    {
        float curveValue = burnCurve.Evaluate(_burnProgress);

        _renderer.GetPropertyBlock(_propBlock);
        _propBlock.SetColor("_Color", Color.Lerp(_originalColor, burnColor, curveValue));

        if (_renderer.sharedMaterial.HasProperty(EmissionColor))
        {
            Color emission = Color.Lerp(
                _originalColor * _originalEmission,
                burnColor * emissionIntensity,
                curveValue);
            _propBlock.SetColor(EmissionColor, emission);
        }

        _renderer.SetPropertyBlock(_propBlock);
    }

    public void Extinguish()
    {
        if (!IsOnFire) return;

        IsOnFire = false;
        enabled = false;

        if (currentFire != null)
        {
            if (currentFire.TryGetComponent<ParticleSystemDestroyer>(out var destroyer))
            {
                destroyer.Stop();
            }
            else
            {
                Destroy(currentFire);
            }
        }
    }

    private void OnDisable()
    {
        if (_renderer != null)
        {
            _renderer.GetPropertyBlock(_propBlock);
            _propBlock.SetColor("_Color", _originalColor);
            if (_renderer.sharedMaterial.HasProperty(EmissionColor))
            {
                _propBlock.SetColor(EmissionColor, _originalColor * _originalEmission);
            }
            _renderer.SetPropertyBlock(_propBlock);
        }
    }

    private void OnDestroy()
    {
        if (currentFire != null)
        {
            Destroy(currentFire);
        }
    }
}