+ 1 moon
This commit is contained in:
parent
0101996b91
commit
9492b79f38
|
@ -20,9 +20,8 @@ public class GameScreen extends BaseScreen implements InputProcessor {
|
|||
// ---------- GENERATION ----------
|
||||
|
||||
public static int numberPlanets = 4;
|
||||
public static int numberMoons = 2;
|
||||
public static int minDistance = 400;
|
||||
public static int maxDistance = 800;
|
||||
public static int minDistance = 600;
|
||||
public static int maxDistance = 900;
|
||||
public static int minMass = 500;
|
||||
public static int maxMass = 1000;
|
||||
public static int minRadius = 20;
|
||||
|
@ -119,6 +118,15 @@ public class GameScreen extends BaseScreen implements InputProcessor {
|
|||
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);
|
||||
|
||||
// players
|
||||
|
|
Loading…
Reference in a new issue