/* Initialize all members.
     */
    protected override void Awake()
    {
        // Standard Boss setup and specialized DevilBoss setup
        base.Awake();
        phaseTwo = gameObject.GetComponent <PhaseTwo>();

        // When moving towards the player, the boss will always stop within its ranged attack radius
        agent.stoppingDistance = rangedDistance - 1;

        // Boss subscribes to its own health change events
        self.healthChangedEvent += OnBossHealthChanged;

        // Boss also subscribes to its own death event
        self.deathEvent += OnBossDied;

        // And finally, boss subscribes to the player's death (for victory animation)
        player.GetComponent <Player>().deathEvent += OnPlayerDied;

        // Set the melee attack timer to the delay initially
        meleeAttackTimer = meleeWeapon.timeBetweenAttacks;

        // Set the ranged attack timer to the delay initially
        rangedAttackTimer = rangedWeapon.timeBetweenAttacks;

        // Stop the game's background audio
        gameManager?.StopBackgroundMusic();

        // Let the games begin
        SignalStartOfBossBattle();
    }
        public string ToLogString()
        {
            var sb = new StringBuilder()
                     .AppendLine($"[{nameof(AnalysisContext)}]")
                     .AppendLine($"Args: {Args.ToLogString()}")
                     .AppendLine($"LaunchContext: {LaunchContext.ToLogString()}")
                     .AppendLine($"OutputExcelFile: '{OutputExcelFile}'")
                     .AppendLine($"PhaseOnePartOne: {PhaseOnePartOne.ToLogString()}")
                     .AppendLine($"PhaseOnePartTwo: {PhaseOnePartTwo.ToLogString()}")
                     .AppendLine($"PhaseOnePartTwo: {PhaseTwo.ToLogString()}")
                     .AppendLine($"GoodnessOfFit: {GoodnessOfFit.ToLogString()}");

            return(sb.ToString());
        }