NASA de retour

This commit is contained in:
Damien 2021-05-12 19:10:38 +02:00
commit 767d23c0d6
3 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@ public class SagittariusGame extends Game {
// Constants // Constants
public static float G = 100; public static float G = 100;
public static boolean debugMode = true; public static boolean debugMode = false;
private static Game game; private static Game game;

View file

@ -45,7 +45,7 @@ public class Bow extends Actor {
} else if (pressed && power > 50) { } else if (pressed && power > 50) {
pressed = false; pressed = false;
GameScreen.playerCurrent.setActive(false); GameScreen.playerCurrent.setActive(false);
Arrow arrowShot = new Arrow(angle, power, GameScreen.playerCurrent); Arrow arrowShot = new Arrow(angle, power, GameScreen.playerCurrent, false);
GameScreen.setFocus(arrowShot); // do not use constructor 2 times GameScreen.setFocus(arrowShot); // do not use constructor 2 times
GameScreen.arrows.addActor(arrowShot); GameScreen.arrows.addActor(arrowShot);
} else { } else {

View file

@ -50,6 +50,10 @@ public class GameScreen extends BaseScreen implements InputProcessor {
Gdx.input.setInputProcessor(this); Gdx.input.setInputProcessor(this);
// arrows
arrows = new Group();
mainStage.addActor(arrows);
// planets & moons // planets & moons
attractors = new Group(); attractors = new Group();
@ -81,10 +85,6 @@ public class GameScreen extends BaseScreen implements InputProcessor {
mainStage.addActor(players); mainStage.addActor(players);
// arrows
arrows = new Group();
mainStage.addActor(arrows);
// The one and only Bow // The one and only Bow
Bow bow = new Bow(true); Bow bow = new Bow(true);
mainStage.addActor(bow); mainStage.addActor(bow);