Package com.prineside.tdi2
Class CollidingProjectile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Projectile
com.prineside.tdi2.CollidingProjectile
- All Implemented Interfaces:
Pool.Poolable,KryoSerializable
- Direct Known Subclasses:
BulletWallProjectile,MultishotProjectile,SplashProjectile,SplinterProjectile
Позиция меняется благодаря preRender(), колизии проверяются в scheduledUpdate()
-
Nested Class Summary
Nested classes/interfaces inherited from class com.prineside.tdi2.Projectile
Projectile.Factory<T extends Projectile> -
Field Summary
FieldsModifier and TypeFieldDescriptionfloatfloatfloatFields 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) voidflyOnEnemy(Enemy enemy) Перенаправить снаряд на врага (метод может быть не реализован)booleanbooleanisDone()voidvoidreset()Resets the object for reuse.voidupdate(float deltaTime) voidMethods inherited from class com.prineside.tdi2.Projectile
draw, getDamage, getPosition, hit, multiplyDamage, onDone, setDamage, setup, toStringMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
flyTime
public float flyTime -
totalFlyTime
public float totalFlyTime -
drawPosition
-
drawAngle
public float drawAngle
-
-
Method Details
-
write
- Specified by:
writein interfaceKryoSerializable- Overrides:
writein classProjectile
-
read
- Specified by:
readin interfaceKryoSerializable- Overrides:
readin classProjectile
-
applyDrawInterpolation
public void applyDrawInterpolation(float interpolatedTime) - Specified by:
applyDrawInterpolationin classProjectile
-
flyOnEnemy
Description copied from class:ProjectileПеренаправить снаряд на врага (метод может быть не реализован)- Overrides:
flyOnEnemyin classProjectile
-
isDone
public boolean isDone()- Specified by:
isDonein classProjectile- Returns:
- true, если снаряд больше не нужен и может быть убран из системы
-
hasReachedTarget
public boolean hasReachedTarget()- Specified by:
hasReachedTargetin classProjectile
-
update
public void update(float deltaTime) - Specified by:
updatein classProjectile
-
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
-