Class BulletWallAbility

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

public class BulletWallAbility extends Ability
Bullet wall ability implementation. Enum: AbilityType.BULLET_WALL
  • Field Details

  • 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
    • 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
    • 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)
    • 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
    • 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)