diff --git a/core/src/sagittarius/model/Arrow.java b/core/src/sagittarius/model/Arrow.java index 450b7cc..864c5d7 100644 --- a/core/src/sagittarius/model/Arrow.java +++ b/core/src/sagittarius/model/Arrow.java @@ -104,13 +104,6 @@ public class Arrow extends Actor { this.velocity.y += dt * ( this.acceleration.y + this.force.y ) / 2; } -// ---------- GRAPHICAL METHODs ---------- - - public void render(ShapeRenderer shapeRenderer) { - // Vector2 tail = new Vector2(-this.length, 0).rotateDeg(this.getRotation()).add(this.position); - // shapeRenderer.line(this.getX(), this.getY(), tail.x, tail.y); - } - @Override public void draw(Batch batch, float parentAlpha) { super.draw(batch, parentAlpha); diff --git a/core/src/sagittarius/model/Bow.java b/core/src/sagittarius/model/Bow.java index 67378b0..77e9009 100644 --- a/core/src/sagittarius/model/Bow.java +++ b/core/src/sagittarius/model/Bow.java @@ -74,18 +74,13 @@ class Bow extends Actor { super.drawDebug(shapes); if (pressed) { shapes.line(this.anchor, GameScreen.worldCursor); + if (aimAssist) { + float[] traj = Arrow.traj(angle, power, shooter, 400, 0.05f); + if (traj.length > 2) { + shapes.polyline(traj); + } + } } } - // void render(ShapeRenderer shapeRenderer) { - // if (pressed) { - // if (aimAssist) { - // float[] traj = Arrow.traj(angle, power, shooter, 400, 0.05f); - // if (traj.length > 2) { - // shapeRenderer.polyline(traj); - // } - // } - // } - // }) - }