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

public abstract class HPTask extends TimerTask
Handles animation for hp being modified.
  • Constructor Details

    • HPTask

      public HPTask(int healthDifference, UUID uuid)
      Initiates an hp task.
      Parameters:
      healthDifference - The difference in health.
      uuid - The UUID of the Pokémon.
  • Method Details

    • boundsCheck

      protected abstract void boundsCheck()
      Checks if the health difference is valid and adjusts it if it is not.
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Specified by:
      run in class TimerTask
    • cancel

      public boolean cancel()
      Overrides:
      cancel in class TimerTask
    • isDone

      public abstract boolean isDone()
      Checks if the animation is finished.
      Returns:
      Whether the animation is finished.