Package com.prineside.tdi2.projectiles
Class LaserProjectile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Projectile
com.prineside.tdi2.projectiles.LaserProjectile
- 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.Projectile
affectedByAbility, id, position, RAYCAST_INTERVAL_MAX, RAYCAST_INTERVAL_MIN, typeFields inherited from class com.prineside.tdi2.Registrable
S -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyDrawInterpolation(float interpolatedTime) voiddraw(com.badlogic.gdx.graphics.g2d.Batch batch, float delta) voidhandleCollisions(float deltaTime) booleanbooleanisDone()voidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidreset()Resets the object for reuse.voidsetEndPos(float x, float y) voidsetStartPos(float x, float y) voidsetup(Tower tower, float duration, float damage, float startX, float startY, float endX, float endY, int penetrationCount) voidstop()voidupdate(float delta) voidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.tdi2.Projectile
flyOnEnemy, getPosition, hit, multiplyDamage, setupMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
penetrationCount
public int penetrationCount
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
writein interfacecom.esotericsoftware.kryo.KryoSerializable- Overrides:
writein classProjectile
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
readin interfacecom.esotericsoftware.kryo.KryoSerializable- Overrides:
readin classProjectile
-
setup
public void setup(Tower tower, float duration, float damage, float startX, float startY, float endX, float endY, int penetrationCount) -
reset
public void reset()Description copied from interface:com.badlogic.gdx.utils.Pool.PoolableResets the object for reuse. Object references should be nulled and fields may be set to default values.- Specified by:
resetin interfacecom.badlogic.gdx.utils.Pool.Poolable- Overrides:
resetin classProjectile
-
stop
public void stop() -
handleCollisions
public void handleCollisions(float deltaTime) -
setStartPos
public void setStartPos(float x, float y) -
setEndPos
public void setEndPos(float x, float y) -
isDone
public boolean isDone()- Specified by:
isDonein classProjectile- Returns:
- true, если снаряд больше не нужен и может быть убран из системы
-
hasReachedTarget
public boolean hasReachedTarget()- Specified by:
hasReachedTargetin classProjectile
-
applyDrawInterpolation
public void applyDrawInterpolation(float interpolatedTime) - Specified by:
applyDrawInterpolationin classProjectile
-
update
public void update(float delta) - Specified by:
updatein classProjectile
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float delta) - Specified by:
drawin classProjectile
-