Package com.prineside.tdi2.projectiles
Class MultishotProjectile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Projectile
com.prineside.tdi2.CollidingProjectile
com.prineside.tdi2.projectiles.MultishotProjectile
- All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable
,com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.prineside.tdi2.Projectile
Projectile.Factory<T extends Projectile>
-
Field Summary
FieldsFields inherited from class com.prineside.tdi2.CollidingProjectile
drawAngle, drawPosition, flyTime, totalFlyTime
Fields inherited from class com.prineside.tdi2.Projectile
id, position, RAYCAST_INTERVAL_MIN, type
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(com.badlogic.gdx.graphics.g2d.Batch batch, float delta) boolean
isDone()
void
onDone()
void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
reset()
Resets the object for reuse.void
void
setup
(Tower tower, float damage, com.badlogic.gdx.math.Vector2 start, com.badlogic.gdx.math.Vector2 end, float speed, boolean penetrating, boolean canAttackAir, boolean counterAttack, float drawScale) void
update
(float deltaTime) void
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.tdi2.CollidingProjectile
applyDrawInterpolation, flyOnEnemy, hasReachedTarget
Methods inherited from class com.prineside.tdi2.Projectile
getDamage, getPosition, hit, multiplyDamage, setDamage, setup, toString
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered
-
Field Details
-
drawScale
public float drawScale -
flyingBack
public boolean flyingBack -
isSplit
public boolean isSplit
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
- Overrides:
write
in classCollidingProjectile
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
- Overrides:
read
in classCollidingProjectile
-
setup
public void setup(Tower tower, float damage, com.badlogic.gdx.math.Vector2 start, com.badlogic.gdx.math.Vector2 end, float speed, boolean penetrating, boolean canAttackAir, boolean counterAttack, float drawScale) -
setUnregistered
public void setUnregistered()- Overrides:
setUnregistered
in classRegistrable
-
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 interfacecom.badlogic.gdx.utils.Pool.Poolable
- Overrides:
reset
in classCollidingProjectile
-
update
public void update(float deltaTime) - Overrides:
update
in classCollidingProjectile
-
isDone
public boolean isDone()- Overrides:
isDone
in classCollidingProjectile
- Returns:
- true, если снаряд больше не нужен и может быть убран из системы
-
onDone
public void onDone()- Overrides:
onDone
in classProjectile
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float delta) - Specified by:
draw
in classProjectile
-