public void OnTriggerStay(Collider other) { if (other.tag == "Player" && isEnableTo) { time += Time.deltaTime; hudHandler.SetMaxProggresBar(inTimeStay); if (inTimeStay <= time) { UpdateHealt(other.gameObject); } else if (inTimeStay > time) { hudHandler.UpdateProggresBar(time); } } }