java.lang.Object
java.util.TimerTask
com.pixelmonmod.pixelmon.client.gui.battles.tasks.HPTask
com.pixelmonmod.pixelmon.client.gui.battles.tasks.DamageTask
All Implemented Interfaces:
Runnable

public class DamageTask extends HPTask
Handles animation for hp being lowered.
  • Constructor Details

    • DamageTask

      public DamageTask(int healthDifference, UUID uuid)
      Initiates an damage task.
      Parameters:
      healthDifference - The damage to deal (negative).
      uuid - The UUID of the Pokémon.
  • Method Details

    • boundsCheck

      protected void boundsCheck()
      Description copied from class: HPTask
      Checks if the health difference is valid and adjusts it if it is not.
      Specified by:
      boundsCheck in class HPTask
    • isDone

      public boolean isDone()
      Description copied from class: HPTask
      Checks if the animation is finished.
      Specified by:
      isDone in class HPTask
      Returns:
      Whether the animation is finished.