Package com.prineside.tdi2
Class Projectile
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Projectile
- All Implemented Interfaces:
Pool.Poolable
,KryoSerializable
- Direct Known Subclasses:
ChainLightningProjectile
,CollidingProjectile
,EnemyFollowingProjectile
,LaserProjectile
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionint
static final float
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
applyDrawInterpolation
(float interpolatedTime) abstract void
void
flyOnEnemy
(Enemy enemy) Перенаправить снаряд на врага (метод может быть не реализован)float
abstract boolean
void
hit()
Вызывается, когда снаряд долетел до целиabstract boolean
isDone()
void
multiplyDamage
(float mul) void
onDone()
void
void
reset()
Resets the object for reuse.void
setDamage
(float damage) void
setup()
toString()
abstract void
update
(float delta) void
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
RAYCAST_INTERVAL_MIN
public static final float RAYCAST_INTERVAL_MIN- See Also:
-
type
-
id
public int id -
position
-
-
Method Details
-
write
- Specified by:
write
in interfaceKryoSerializable
- Overrides:
write
in classRegistrable
-
read
- Specified by:
read
in interfaceKryoSerializable
- Overrides:
read
in classRegistrable
-
setup
public void setup() -
getPosition
-
getDamage
public float getDamage() -
setDamage
public void setDamage(float damage) -
multiplyDamage
public void multiplyDamage(float mul) -
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 interfacePool.Poolable
-
hit
public void hit()Вызывается, когда снаряд долетел до цели -
isDone
public abstract boolean isDone()- Returns:
- true, если снаряд больше не нужен и может быть убран из системы
-
hasReachedTarget
public abstract boolean hasReachedTarget() -
onDone
public void onDone() -
flyOnEnemy
Перенаправить снаряд на врага (метод может быть не реализован) -
applyDrawInterpolation
public abstract void applyDrawInterpolation(float interpolatedTime) -
update
public abstract void update(float delta) -
draw
-
toString
-