Class CollidingProjectile

All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable, com.esotericsoftware.kryo.KryoSerializable
Direct Known Subclasses:
BulletWallProjectile, MultishotProjectile, SplashProjectile, SplinterProjectile

public abstract class CollidingProjectile extends Projectile
Позиция меняется благодаря preRender(), колизии проверяются в scheduledUpdate()
  • Field Details

    • flyTime

      public float flyTime
    • totalFlyTime

      public float totalFlyTime
    • 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:
      write in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      write in class Projectile
    • read

      public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
      Specified by:
      read in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      read in class Projectile
    • applyDrawInterpolation

      public void applyDrawInterpolation(float interpolatedTime)
      Specified by:
      applyDrawInterpolation in class Projectile
    • flyOnEnemy

      public void flyOnEnemy(Enemy enemy)
      Description copied from class: Projectile
      Перенаправить снаряд на врага (метод может быть не реализован)
      Overrides:
      flyOnEnemy in class Projectile
    • isDone

      public boolean isDone()
      Specified by:
      isDone in class Projectile
      Returns:
      true, если снаряд больше не нужен и может быть убран из системы
    • hasReachedTarget

      public boolean hasReachedTarget()
      Specified by:
      hasReachedTarget in class Projectile
    • update

      public void update(float deltaTime)
      Specified by:
      update in class Projectile
    • 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 interface com.badlogic.gdx.utils.Pool.Poolable
      Overrides:
      reset in class Projectile