Class Poison

java.lang.Object
de.tum.cit.fop.maze.effects.Effect
de.tum.cit.fop.maze.effects.Poison

public class Poison extends Effect
A Poison effect that deals damage over time and slows the player.
  • Constructor Details

    • Poison

      public Poison(Player player)
      Creates a new Poison effect.
      Parameters:
      player - The player to poison.
  • Method Details

    • onStart

      public void onStart()
      Description copied from class: Effect
      Called when the effect is first applied.
      Specified by:
      onStart in class Effect
    • onTick

      public boolean onTick(float deltaTime)
      Description copied from class: Effect
      Called every frame to update the effect.
      Overrides:
      onTick in class Effect
      Parameters:
      deltaTime - The time elapsed since the last frame.
      Returns:
      True if the effect has expired, false otherwise.
    • onEnd

      public void onEnd()
      Description copied from class: Effect
      Called when the effect expires or is removed.
      Specified by:
      onEnd in class Effect