Health Bar issue

Hi Team,

I am trying to implement the health Bar though Image.fillamount in Unity, In which the bar will be keep increasing on eating food and decreses on touching obstacles for my Runner Game. The Health Bar usually have 5Bars.

All i wanted is, on decreasing if it comes to 4TH Health Bar, if the player eats any food (Health Booster) the increment should happen and it should get carry forward to Next Health Bar( i.e for 5th HealthBar), like the same way on decrementing also the carry forward should happen.

Waiting for your replay.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;

 public class BarHandler : MonoBehaviour
 {
     [SerializeField] BarState mBarState = null;
     [SerializeField] PlayerManager mPlayerManager = null;
     [SerializeField] Image mContentIndicator = null;
     [SerializeField] Color mFullColor;
     [SerializeField] Color mLowColor;
     [SerializeField] bool mbLerpColors;
     [SerializeField] float mfLerpSpeed;
     [SerializeField] int miNumberOfBars;
     int miBackupOfNumberOfBars;
     float mfUpdatedFillAmount;
     float mfTempFillAmount;
     float mfTempMaxValue;
     bool mbBarFillControll = true;
     bool mbBarCountIncrementControll = false;
     static BarHandler mInstance = null;
 
     public int AutoImplementedProperties_NumberOfBars
     {
         get { return miNumberOfBars;                }
 
         set { miNumberOfBars = value;               }
     }
 
     public int AutoImplementedProperties_BackupOfNumberOfBars
     {
         get { return miBackupOfNumberOfBars;        }
 
         set { miBackupOfNumberOfBars = value;       }
     }
 
     public bool AutoImplementedProperties_BarCountIncrementControl
     {
         get { return mbBarCountIncrementControll;   }
 
         set { mbBarCountIncrementControll = value;  }
     }
 
     public float AutoImplementedProperties_TempFillAmount
     {
         get { return mfTempFillAmount;              }
 
         set { mfTempFillAmount = value;             }
     }
 
     public float AutoImplementedProperties_MinValue
     {
         get;
         set;
     }
 
     public float AutoImplementedProperties_MaxValue
     {
         get;
         set;
     }
 
     public float AutoImplementedProperties_Value
     {
         set
         {
             if (miNumberOfBars > 0)
             {
                 mfUpdatedFillAmount = Map(value, AutoImplementedProperties_MinValue, AutoImplementedProperties_MaxValue, 0, 1);
             }
         }
     }
 
     public static BarHandler Instance
     {
         get { return mInstance; }
     }
 
     private void Awake()
     {
         mInstance = this;
         miBackupOfNumberOfBars = miNumberOfBars;
     }
 
     private void Start()
     {
         mContentIndicator.fillAmount = mfUpdatedFillAmount;
 
         if (mbLerpColors)
         {
             mContentIndicator.color = mFullColor;
         }
     }
 
     private void Update()
     {
         //Debug.Log("BarCountIncrementControll: " + mbBarCountIncrementControll);
         //Debug.Log("Player's current number of healthbar: " + miNumberOfBars);
         Debug.Log("Current Health: " + mContentIndicator.fillAmount * 100);
         HandleBar();
         DisplayNumberOfHealth();
     }
 
     private void HandleBar()
     {
         //Debug.Log("TempFillAmount: " + mfTempFillAmount);
         if (miNumberOfBars > 0 && mbBarFillControll)
         {
             if (Math.Round(mContentIndicator.fillAmount, 3) != Math.Round(mfUpdatedFillAmount, 3))
             {
                 mfTempFillAmount = Mathf.Abs(mContentIndicator.fillAmount - mfUpdatedFillAmount);
                 Debug.Log("Current fillamount: " + mContentIndicator.fillAmount + " UpdatedFillAmount : " + mfUpdatedFillAmount);
 
                 //if (Math.Round(mfTempFillAmount, 2) < Math.Round(mContentIndicator.fillAmount, 2))
                 //{
 
                 //}
 
                 mContentIndicator.fillAmount = Mathf.Lerp(mContentIndicator.fillAmount, mfUpdatedFillAmount, Time.deltaTime * mfLerpSpeed);
 
                 if (mbLerpColors)
                 {
                     mContentIndicator.color = Color.Lerp(mLowColor, mFullColor, mfUpdatedFillAmount);
                 }
             }
         }
 
         if (Math.Round(mContentIndicator.fillAmount, 3) < 0.010f)
         {
             mbBarFillControll = false;
 
             if (miNumberOfBars > 0)
             {
                 miNumberOfBars -= 1;
                 PlayerManager.Instance.AutoImplementedProperties_PlayerHealthState  = PlayerManager.ePlayerHealthSituation.IHHeatlh; // Set Current health to 100%(Full) again.
                 mbBarFillControll = true;
             }
 
             else if (miNumberOfBars == 0)
             {
                 mContentIndicator.fillAmount = 0.0f;
             }
         }
 
         if (Math.Round(mContentIndicator.fillAmount, 3) > 0.990f && mbBarCountIncrementControll)
         {
             mbBarCountIncrementControll = false;
 
             if (miNumberOfBars < miBackupOfNumberOfBars)
             {
                 miNumberOfBars += 1;
                 PlayerManager.Instance.AutoImplementedProperties_PlayerHealthState = PlayerManager.ePlayerHealthSituation.HTOHeatlh; // Set current health to something like 75% 
             }
         }
     }
 
     private void DisplayNumberOfHealth()
     {
         if (miNumberOfBars > 0)
         {
             Text ValueText = mContentIndicator.GetComponentInChildren<Text>();
             ValueText.text = (miNumberOfBars).ToString() + "x";
             //string[] ArrOfTempText  = ValueText.text.Split(':');
             //ValueText.text          = ArrOfTempText[0] + (miNumberOfBars - 1).ToString();
         }
     }
 
     private float Map(float value, float inMin, float inMax, float outMin, float outMax)
     {
         return (value - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
     }
 }