Package com.prineside.tdi2
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
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionfloat
static final float
float
Multiplies the base valuestatic final int
Number of rays in raysPowerFields inherited from class com.prineside.tdi2.Registrable
S
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExplosionParticle
(Color color, LimitedParticleType type) static float
calculateDamage
(float damage, float distanceToCenter, float rayPower) cpy()
void
explode()
static int
getRayIndex
(Vector2 a, Vector2 b) getTower()
boolean
isDone()
void
multiplyDamage
(float mul) void
void
reset()
Resets the object for reuse.void
update
(float delta) Explosion starts at the epicenter and grows constantly with each update, until it reaches its rangevoid
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
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_COUNTNumber of rays in raysPower- See Also:
-
type
-
position
-
damage
public float damage -
fromAbility
-
piercingMultiplier
public float piercingMultiplierMultiplies the base value
-
-
Method Details
-
write
- Specified by:
write
in interfaceKryoSerializable
- Overrides:
write
in classRegistrable
-
read
- Specified by:
read
in interfaceKryoSerializable
- Overrides:
read
in classRegistrable
-
getTower
-
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 interfacePool.Poolable
-
multiplyDamage
public void multiplyDamage(float mul) -
explode
public void explode() -
calculateDamage
public static float calculateDamage(float damage, float distanceToCenter, float rayPower) -
getRayIndex
-
update
public void update(float delta) Explosion starts at the epicenter and grows constantly with each update, until it reaches its range -
addExplosionParticle
-
isDone
public boolean isDone()
-