Class Explosion

java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Explosion
All Implemented Interfaces:
Pool.Poolable, KryoSerializable
Direct Known Subclasses:
AirFallExplosion, CannonExplosion, FireballExplosion, GenericExplosion, MissileExplosion

public abstract class Explosion extends Registrable implements Pool.Poolable
  • Field Details

    • EXPLOSION_RANGE_ENEMY_SEARCH_SPACING

      public static final float EXPLOSION_RANGE_ENEMY_SEARCH_SPACING
      See Also:
    • RAY_COUNT

      public static final int RAY_COUNT
      Number of rays in raysPower
      See Also:
    • type

      public ExplosionType type
    • position

      public Vector2 position
    • damage

      public float damage
    • fromAbility

      public Ability fromAbility
    • piercingMultiplier

      public float piercingMultiplier
      Multiplies the base value
  • Method Details

    • write

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

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

      @Null public Tower getTower()
    • cpy

      public Explosion cpy()
    • reset

      public void reset()
      Description copied from interface: com.badlogic.gdx.utils.Pool.Poolable
      Resets the object for reuse. Object references should be nulled and fields may be set to default values.
      Specified by:
      reset in interface Pool.Poolable
    • multiplyDamage

      public void multiplyDamage(float mul)
    • explode

      public void explode()
    • calculateDamage

      public static float calculateDamage(float damage, float distanceToCenter, float rayPower)
    • getRayIndex

      public static int getRayIndex(Vector2 a, Vector2 b)
    • update

      public void update(float delta)
      Explosion starts at the epicenter and grows constantly with each update, until it reaches its range
    • addExplosionParticle

      public void addExplosionParticle(Color color, LimitedParticleType type)
    • isDone

      public boolean isDone()