Resupply Problem

Hello,
I am working on a game in wich there are units that are fighting against each other. Now I want resupply for my units. This works by adding the life of the unit a certain number over time(if somone knows how to improve this i would be gratefull). If an enemy unit now comes near, the friendly unit´s supply should drop, and if it is gone it should be normal. But it Is constantly counting the resupply value down to infinity. It should look something like this: Reupply normal: 2, Enemy there: Resupply 1; Enemy gone again: Resupply 2. Pls help.`using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Enemy : MonoBehaviour
{

public float resup;
public float health;

public void Resup(float resupx)
{

    resup -= resupx;

}

public void Update()
{

    health += resup * Time.deltaTime;

}

public void TakeDamage(float damage)
{
    health -= damage;

    if(health < 1)
    {
        Destroy(gameObject);
       
    }
}

}
`using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UnitBattel : MonoBehaviour
{
// Start is called before the first frame update

public LayerMask  whatIsEnemy;
public float  attackRange;
public bool  enemyInAttackRange;
public float damage;
public float resupx;
[SerializeField] private float range;

// Update is called once per frame
void Update()
{
   
    enemyInAttackRange = Physics.CheckSphere(transform.position, attackRange, whatIsEnemy);

    if (enemyInAttackRange) AttackPlayer();
}

private void AttackPlayer()
{

    Collider[] colliderArray = Physics.OverlapSphere(transform.position, range);
    foreach (Collider collider in colliderArray)
    {
        if (collider.TryGetComponent<Enemy>(out Enemy enemy))
        {

            enemy.TakeDamage(damage);
            enemy.Resup(resupx);

            return;
        }

    }
}

}`