public override void StartBossBattle(OnBossComplete _completionCallback)
        {
            m_isBattleInProgress   = true;
            m_bossCompleteCallback = _completionCallback;
            ChangeToDifferentTargetPosition();
            Vector3 targetPosition = m_targetPosition;

            targetPosition.x              = m_miniGame.VisibleWorldBounds.max.x + 10.24f;
            base.transform.position       = targetPosition;
            m_warning.RendererToWarnAbout = m_armRenderer;
            m_warning.ActivateWarning(3);
            m_miniGame.PlaySFX(mg_jr_Sound.BOSS_ALERT.ClipName());
            m_currentState = HerbertState.MOVING;
        }
        private void Update()
        {
            if (m_miniGame.IsPaused || !m_miniGame.GameLogic.IsGameInProgress || !m_isBattleInProgress)
            {
                return;
            }
            switch (m_currentState)
            {
            case HerbertState.MOVING:
            {
                float maxDistanceDelta = 4.4f * Time.deltaTime;
                base.transform.position = Vector3.MoveTowards(base.transform.position, m_targetPosition, maxDistanceDelta);
                if (base.transform.position == m_targetPosition)
                {
                    Shoot();
                    if (Random.value < 0.5f)
                    {
                        m_miniGame.PlaySFX(mg_jr_Sound.BOSS_HERBERT_LAUGH.ClipName());
                    }
                    m_currentState = HerbertState.WAITING;
                }
                break;
            }

            case HerbertState.WAITING:
                m_timeWaiting += Time.deltaTime;
                if (m_timeWaiting > 1f)
                {
                    m_timeWaiting = 0f;
                    if (m_shotsFired >= 3)
                    {
                        m_currentState = HerbertState.LEAVING;
                        break;
                    }
                    ChangeToDifferentTargetPosition();
                    m_currentState = HerbertState.MOVING;
                }
                break;

            case HerbertState.LEAVING:
            {
                float maxDistanceDelta = 4.4f * Time.deltaTime;
                base.transform.position = Vector3.MoveTowards(base.transform.position, m_exitTargetPosition, maxDistanceDelta);
                if (base.transform.position == m_exitTargetPosition)
                {
                    if (m_bossCompleteCallback != null)
                    {
                        m_bossCompleteCallback();
                    }
                    m_miniGame.StopSFX(mg_jr_Sound.BOSS_HERBERT_FLY_LOOP.ClipName());
                    m_isBattleInProgress = false;
                    m_miniGame.Resources.ReturnPooledResource(base.gameObject);
                }
                break;
            }

            default:
                Assert.IsTrue(condition: false, "Unhandled or invalid state");
                break;
            }
            if (!m_hasHerbertBeenVisible && base.transform.position.x < m_miniGame.VisibleWorldBounds.max.x)
            {
                m_warning.DeactivateWarning();
                m_miniGame.PlaySFX(mg_jr_Sound.BOSS_HERBERT_FLY_LOOP.ClipName());
                m_hasHerbertBeenVisible = true;
            }
        }