Class AttackProtectionComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.boss.AttackProtectionComponent

public class AttackProtectionComponent extends Component
AttackProtectionCounterComponent

Listens to "updateHealth" from CombatStatsComponent. - Each time health decreases, count one hit. - When hit count reaches limit, start no-damage via DamageReductionComponent.start(1f, seconds).

  • Constructor Details

    • AttackProtectionComponent

      public AttackProtectionComponent()
    • AttackProtectionComponent

      public AttackProtectionComponent(int limit, float seconds)
  • Method Details

    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      Overrides:
      create in class Component