Beispiel #1
0
 @Override
 public void update() {
   time += Gdx.graphics.getDeltaTime();
   if (targetLockedOn() && time >= TURRET_RATE_OF_FIRE) {
     raycast.setRay(this.getPosition(), target.getPosition(), RAY_CAST_STEP_LENGTH);
     raycast.process();
     time = 0;
   }
 }
Beispiel #2
0
 public Vector2 getTargetPosition() {
   return target.getPosition();
 }
Beispiel #3
0
 @Override
 public void endInteraction(Entity entity) {
   entity.endInteraction(this);
 }
Beispiel #4
0
 @Override
 public void beginInteraction(Entity entity) {
   entity.beginInteraction(this);
 }