@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; } }
public Vector2 getTargetPosition() { return target.getPosition(); }
@Override public void endInteraction(Entity entity) { entity.endInteraction(this); }
@Override public void beginInteraction(Entity entity) { entity.beginInteraction(this); }