using DoomDeathmatch.Component.MVC.Enemy;
using DoomDeathmatch.Component.MVC.Health;

namespace DoomDeathmatch.Script.Model.Enemy.Attack;

public class CompositeAttackBehavior(
  EnemyController parEnemyController,
  HealthController parHealthController,
  List<AttackBehavior> parBehaviors)
  : AttackBehavior(parEnemyController, parHealthController)
{
  public override bool Attack(double parDeltaTime)
  {
    var result = false;

    foreach (var behavior in parBehaviors)
    {
      result |= behavior.Attack(parDeltaTime);
    }

    return result;
  }
}