This commit is contained in:
Damien 2021-05-29 12:27:01 +02:00
parent 0101996b91
commit 9492b79f38

View file

@ -20,9 +20,8 @@ public class GameScreen extends BaseScreen implements InputProcessor {
// ---------- GENERATION ---------- // ---------- GENERATION ----------
public static int numberPlanets = 4; public static int numberPlanets = 4;
public static int numberMoons = 2; public static int minDistance = 600;
public static int minDistance = 400; public static int maxDistance = 900;
public static int maxDistance = 800;
public static int minMass = 500; public static int minMass = 500;
public static int maxMass = 1000; public static int maxMass = 1000;
public static int minRadius = 20; public static int minRadius = 20;
@ -119,6 +118,15 @@ public class GameScreen extends BaseScreen implements InputProcessor {
attractors.addActor(planet); attractors.addActor(planet);
} }
Moon moon = new Moon(
(Planet) attractors.getChild( MathUtils.random(numberPlanets-1)),
minMass / 2 + MathUtils.random(maxMass - minMass) / 2,
minRadius / 2 + MathUtils.random(maxRadius - minRadius) / 2,
minDistance / 2,
new Color((int)(Math.random() * 0x1000000))
);
attractors.addActor(moon);
mainStage.addActor(attractors); mainStage.addActor(attractors);
// players // players