Package com.prineside.tdi2
Class EnemyFollowingProjectile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Projectile
com.prineside.tdi2.EnemyFollowingProjectile
- All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable,com.esotericsoftware.kryo.KryoSerializable
- Direct Known Subclasses:
AirProjectile,BasicProjectile,BuffProjectile,EnemyFollowingExplosiveProjectile,VenomProjectile
Обычный снаряд, который долетает до целевого врага
-
Nested Class Summary
Nested classes/interfaces inherited from class com.prineside.tdi2.Projectile
Projectile.Factory<T extends Projectile> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatstatic final floatfloatcom.badlogic.gdx.math.Vector2floatfloatfloatcom.badlogic.gdx.math.Vector2Fields 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) voidflyOnEnemy(Enemy enemy) Перенаправить снаряд на врага (метод может быть не реализован)com.badlogic.gdx.math.Vector2booleanbooleanisDone()voidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidreset()Resets the object for reuse.voidvoidvoidupdate(float deltaTime) voidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.tdi2.Projectile
draw, hit, multiplyDamage, setupMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered
-
Field Details
-
DEFAULT_MAX_ROT_SPEED
public static final float DEFAULT_MAX_ROT_SPEED- See Also:
-
DEFAULT_MAX_ROT_SPEED_DYNAMIC
public static final float DEFAULT_MAX_ROT_SPEED_DYNAMIC- See Also:
-
start
public com.badlogic.gdx.math.Vector2 start -
speed
public float speed -
maxRotationSpeed
public float maxRotationSpeed -
maxRotationSpeedDynamic
public float maxRotationSpeedDynamic -
drawPosition
public com.badlogic.gdx.math.Vector2 drawPosition -
drawAngle
public float drawAngle
-
-
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
-
getTarget
- Returns:
- null if no target / target is unregistered (no need to check for Enemy.isRegistered())
-
setTarget
-
applyDrawInterpolation
public void applyDrawInterpolation(float interpolatedTime) - Specified by:
applyDrawInterpolationin classProjectile
-
flyOnEnemy
Description copied from class:ProjectileПеренаправить снаряд на врага (метод может быть не реализован)- Overrides:
flyOnEnemyin classProjectile
-
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 interfacecom.badlogic.gdx.utils.Pool.Poolable- Overrides:
resetin classProjectile
-
getPosition
public com.badlogic.gdx.math.Vector2 getPosition()- Overrides:
getPositionin classProjectile
-
update
public void update(float deltaTime) - Specified by:
updatein classProjectile
-
isDone
public boolean isDone()- Specified by:
isDonein classProjectile- Returns:
- true, если снаряд больше не нужен и может быть убран из системы
-
hasReachedTarget
public boolean hasReachedTarget()- Specified by:
hasReachedTargetin classProjectile
-