fix: typo, I'm stupid
This commit is contained in:
parent
0301d8af71
commit
1d887cad5c
|
@ -16,9 +16,9 @@ public class Arrow extends Actor {
|
|||
|
||||
// ---------- ATTRIBUTEs ----------
|
||||
|
||||
private Vector2 velocity = new Vector2();
|
||||
private Vector2 acceleration = new Vector2();
|
||||
private Vector2 force = new Vector2();
|
||||
private Vector2 velocity;
|
||||
private Vector2 acceleration;
|
||||
private Vector2 force;
|
||||
|
||||
private float TTL = 20;
|
||||
|
||||
|
@ -56,10 +56,11 @@ public class Arrow extends Actor {
|
|||
for (Actor actor : GameScreen.planets.getChildren()) {
|
||||
|
||||
float dx = actor.getX() - this.getX();
|
||||
float dy = actor.getX() - this.getX();
|
||||
float dy = actor.getY() - this.getY();
|
||||
|
||||
float len2 = dx*dx + dy*dy;
|
||||
float coeff = SagittariusGame.G * ((Planet) actor).getMass() * (float) Math.pow(len2, -3/2);
|
||||
|
||||
float coeff = (float) (SagittariusGame.G * ((Planet) actor).getMass() * Math.pow(len2, -3/2));
|
||||
|
||||
float gravityX = coeff * dx;
|
||||
float gravityY = coeff * dy;
|
||||
|
|
Loading…
Reference in a new issue