Class Explosion

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

public abstract class Explosion extends Registrable implements com.badlogic.gdx.utils.Pool.Poolable
  • Field Details

    • type

      public ExplosionType type
    • position

      public com.badlogic.gdx.math.Vector2 position
    • damage

      public float damage
    • rangeInTiles

      protected float rangeInTiles
    • rangeInPixels

      protected float rangeInPixels
    • totalDuration

      protected float totalDuration
    • fromAbility

      public Ability fromAbility
    • piercingMultiplier

      public float piercingMultiplier
  • Constructor Details

  • Method Details

    • write

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

      public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
      Specified by:
      read in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      read in class Registrable
    • setup

      protected void setup(@Null Tower tower, float x, float y, float damage, float rangeInTiles, float duration, Ability fromAbility)
    • 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 com.badlogic.gdx.utils.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(com.badlogic.gdx.math.Vector2 a, com.badlogic.gdx.math.Vector2 b)
    • update

      public void update(float delta)
      Взрыв идет из эпицентра, здесь он постепенно растет
    • addExplosionParticle

      public void addExplosionParticle(com.badlogic.gdx.graphics.Color color, LimitedParticleType type)
    • enemyAffected

      protected void enemyAffected(Enemy enemy, float distanceToEpicenter, float rayPower)
    • isDone

      public boolean isDone()