GammelJan 6 years ago
parent efc6f03ea8
commit 0bbf6e1c4c

@ -41,17 +41,17 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
batch = new SpriteBatch(); batch = new SpriteBatch();
Gdx.input.setInputProcessor(this); Gdx.input.setInputProcessor(this);
level = new Level(new Goal(500,500,200,150), new Projectile(100,100,0),400,400); level = new Level(new Goal(1000,500,200,150), new Projectile(100,100,0),400,400);
stepTimer = new Timer(); stepTimer = new Timer();
stepTimer.scheduleTask(new Timer.Task() { stepTimer.scheduleTask(new Timer.Task() {
@Override @Override
public void run() { public void run() {
if(ls != null) { if(gs != null) {
level.step(); level.step();
} }
} }
}, 0, 0.1f); }, 0, 0.01f);
} }
@Override @Override

@ -15,7 +15,7 @@ import com.throwgame.main.ThrowMath;
*/ */
public class Level { public class Level {
private final double G = 9.81; private final double G = 9.81;
private final int RADIUS = 50; private final int RADIUS = 100;
private Goal goal; private Goal goal;
private Projectile projectile; private Projectile projectile;
@ -56,7 +56,7 @@ public class Level {
} }
private void stepPivot(){ private void stepPivot(){
angleSpeed += 0.1; angleSpeed += 0.001;
angle += angleSpeed; angle += angleSpeed;
Vector2 newPosVector = math.pivotGetNewPos(this.angle, this.xPosPivot, this.yPosPivot, RADIUS); Vector2 newPosVector = math.pivotGetNewPos(this.angle, this.xPosPivot, this.yPosPivot, RADIUS);

Loading…
Cancel
Save