using DoomDeathmatch.Component.MVC.Controller;

namespace DoomDeathmatch.Component.MVC.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;
  }
}