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:
 Pool.Poolable,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
id, position, RAYCAST_INTERVAL_MIN, typeFields inherited from class com.prineside.tdi2.Registrable
S - 
Method Summary
Modifier and TypeMethodDescriptionvoidapplyDrawInterpolation(float interpolatedTime) voidfloatfloatgetEndX()floatgetEndY()floatfloatvoidhandleCollisions(float deltaTime) booleanbooleanisDone()voidvoidreset()Resets the object for reuse.voidsetDuration(float duration) voidsetEndPos(float x, float y) voidsetStartPos(float x, float y) voidvoidsetup(Tower tower, float duration, float damage, float startX, float startY, float endX, float endY, int penetrationCount) voidstop()voidupdate(float delta) voidMethods inherited from class com.prineside.tdi2.Projectile
flyOnEnemy, getDamage, getPosition, hit, multiplyDamage, onDone, setDamage, setup, toStringMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered 
- 
Field Details
- 
penetrationCount
public int penetrationCount 
 - 
 - 
Method Details
- 
write
- Specified by:
 writein interfaceKryoSerializable- Overrides:
 writein classProjectile
 - 
read
- Specified by:
 readin interfaceKryoSerializable- Overrides:
 readin classProjectile
 - 
setup
public void setup(Tower tower, float duration, float damage, float startX, float startY, float endX, float endY, int penetrationCount)  - 
getStartX
public float getStartX() - 
getStartY
public float getStartY() - 
getEndX
public float getEndX() - 
getEndY
public float getEndY() - 
setUnregistered
public void setUnregistered()- Overrides:
 setUnregisteredin classRegistrable
 - 
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 interfacePool.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)  - 
getDuration
public float getDuration() - 
setDuration
public void setDuration(float duration)  - 
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
- Specified by:
 drawin classProjectile
 
 -