Class TimerComponent

java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.TimerComponent

public class TimerComponent extends Component
When this entity touches a valid enemy's hitbox, deal damage to them and apply a knockback.

Requires CombatStatsComponent, HitboxComponent on this entity.

Damage is only applied if target entity has a CombatStatsComponent. Knockback is only applied if target entity has a PhysicsComponent.

  • Constructor Details

    • TimerComponent

      public TimerComponent()
  • Method Details

    • update

      public void update()
      Description copied from class: Component
      Called once per frame of the game, and should be used for most component logic. Not called if component is disabled.
      Overrides:
      update in class Component