Disable a function in C#

using UnityEngine;

public class RaycastShoot : MonoBehaviour
{

    [SerializeField]
    private float range = 300f;
    [SerializeField]
    private float timer;

    private RaycastHit hit;
    private Transform  myTransform;

    void Start()
    {
        myTransform = transform;
    }

    void Update()
    {
        timer -= Time.deltaTime;
        if (timer < 0)
        {
            timer = 0;
            Shoot();
        }
        timer += Time.deltaTime;
        if (timer >= .2)
        {
            Shoot() = false;
        }
    }

    void Shoot ()
    {
        if (Input.GetButton("Fire1"))
        {
            Debug.DrawRay(myTransform.TransformPoint(0, 0, 1f), myTransform.forward, Color.green, 3);
            if (Physics.Raycast(myTransform.TransformPoint(0, 0, .1f), myTransform.forward, out hit, range))
            {
                if (hit.transform.CompareTag("Enemy"))
                {
                    Debug.Log("Enemy" + hit.transform.name);
                }
                else
                {
                    Debug.Log("Not an enemy");
                }
            }
        }
    }
}

I am trying to make a timer to disable the Shoot() function in void Update. Help?

Could you describe the behavior you want? I’m having a hard time understanding what you want to happen. @SynergyStudios

I answered this on another version of the same question you posted.