Class OverloadAbility

java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Ability
com.prineside.tdi2.abilities.OverloadAbility
All Implemented Interfaces:
KryoSerializable

public class OverloadAbility extends Ability
Overload ability implementation. Enum: AbilityType.OVERLOAD
  • Field Details

    • AFFECTED_DEBUFFS

      public static final BuffType[] AFFECTED_DEBUFFS
  • Method Details

    • write

      public void write(Kryo kryo, Output output)
      Specified by:
      write in interface KryoSerializable
      Overrides:
      write in class Ability
    • read

      public void read(Kryo kryo, Input input)
      Specified by:
      read in interface KryoSerializable
      Overrides:
      read in class Ability
    • onDone

      public void onDone()
      Description copied from class: Ability
      Called by the AbilitySystem once it realizes that the ability Ability.isDone() but before the ability gets unregistered. Usually used by the implementations of this class to remove particle effects and event listeners.
      Overrides:
      onDone in class Ability
    • getLevel

      public int getLevel()
    • draw

      public void draw(Batch batch, float deltaTime)
      Description copied from class: Ability
      Called by AbilitySystem.draw(Batch, float) each frame. Allows to update realtime graphics of the ability.
      Specified by:
      draw in class Ability
      Parameters:
      batch - Batch used for rendering
      deltaTime - delta time since the last frame (dynamic)
    • configure

      public void configure(int x, int y, double mdps)
      Description copied from class: Ability
      Configures ability before it can be started. Sets the position on map where this ability will start - depending on ability type, it can apply an effect in that point. Some abilities can ignore the position completely.
      Specified by:
      configure in class Ability
      Parameters:
      x - X position (px) where this ability will start
      y - Y position (px) where this ability will start
      mdps - MDPS value which will be used to calculate the efficiency of this ability. Normally S.enemy.getTowersMaxDps() is used here.
    • start

      public boolean start()
      Description copied from class: Ability
      Starts the ability. Normally only called by the AbilitySystem and not manually. Use AbilitySystem.startAbility(Ability) to trigger the events and handle the ability properly.
      Overrides:
      start in class Ability
      Returns:
      true if started, false if can't start and should be ignored
    • startEffects

      public void startEffects()
      Description copied from class: Ability
      Shows screen effects and UI particles. It is suggested not to call this method if ability gets started frequently, as it may flash the screen too much.
      Overrides:
      startEffects in class Ability
    • update

      public void update(float deltaTime)
      Description copied from class: Ability
      Called by the AbilitySystem each frame to update the state of this ability.
      Specified by:
      update in class Ability
      Parameters:
      deltaTime - delta time since the last frame (fixed)
    • getDifficulty

      public float getDifficulty()
    • getMiningSpeed

      public float getMiningSpeed()
    • isDone

      public boolean isDone()
      Description copied from class: Ability
      Used to check if the ability has finished running. Used by the AbilitySystem to finish the handling of the ability.
      Specified by:
      isDone in class Ability
      Returns:
      true if ability has finished running and can be unregistered from the game state