private void HandleBodyStatusChanged(BossBodyController.BodyStatus bodyStatus) { ComputeTotalBossHealth(); // If the body is not there, there is nothing the Boss can do if (bodyStatus.bodyDestroyed) { DestroyBoss(); } }
private void SetBossMaxHealth() { BossArmController.ArmStatus leftArmStatus = _leftArmController.GetArmStatus(); BossArmController.ArmStatus rightArmStatus = _rightArmController.GetArmStatus(); BossArmController.ArmStatus topArmStatus = _topArmController.GetArmStatus(); BossArmController.ArmStatus bottomArmStatus = _bottomArmController.GetArmStatus(); BossBodyController.BodyStatus bodyStatus = _bodyController.GetBodyStatus(); float totalMaxHealth = leftArmStatus.firstArmMaxHealth + leftArmStatus.secondArmMaxHealth; totalMaxHealth += (rightArmStatus.firstArmMaxHealth + rightArmStatus.secondArmMaxHealth); totalMaxHealth += (topArmStatus.firstArmMaxHealth + topArmStatus.secondArmMaxHealth); totalMaxHealth += (bottomArmStatus.firstArmMaxHealth + bottomArmStatus.secondArmMaxHealth); totalMaxHealth += bodyStatus.bodyMaxHealth; GD.Print($"Max Boss Health: {totalMaxHealth}"); _bossTotalHealthSetter.SetMaxHealth(totalMaxHealth); }
private void ComputeTotalBossHealth() { BossArmController.ArmStatus leftArmStatus = _leftArmController.GetArmStatus(); BossArmController.ArmStatus rightArmStatus = _rightArmController.GetArmStatus(); BossArmController.ArmStatus topArmStatus = _topArmController.GetArmStatus(); BossArmController.ArmStatus bottomArmStatus = _bottomArmController.GetArmStatus(); BossBodyController.BodyStatus bodyStatus = _bodyController.GetBodyStatus(); float totalHealth = leftArmStatus.firstArmHealth + leftArmStatus.secondArmHealth; totalHealth += (rightArmStatus.firstArmHealth + rightArmStatus.secondArmHealth); totalHealth += (topArmStatus.firstArmHealth + topArmStatus.secondArmHealth); totalHealth += (bottomArmStatus.firstArmHealth + bottomArmStatus.secondArmHealth); totalHealth += bodyStatus.bodyHealth; GD.Print($"Total Boss Health: {totalHealth}"); _bossTotalHealthSetter.ForceSetCurrentHealth(totalHealth); }