feat: ajout de la totalité des niveaux gestion de l'interface adaptative en fonction de la technologie
This commit is contained in:
parent
d8369a7cb0
commit
1f3fe69f61
|
@ -230,16 +230,25 @@ public class Menu extends Actor {
|
||||||
|
|
||||||
public void update() {
|
public void update() {
|
||||||
clearall();
|
clearall();
|
||||||
this.setMenuTile(0, 7, 71, "copper_pen",0);
|
if (worlds.getInformations().Cout>=0)
|
||||||
this.setMenuTile(1, 7, 72, "copper_brush",0);
|
{
|
||||||
this.setMenuTile(2, 7, 73, "copper_eraser",0);
|
this.setMenuTile(0, 7, 71, "copper_pen",0);
|
||||||
this.setMenuTile(1, 5, 70, "blank",0);
|
this.setMenuTile(1, 7, 72, "copper_brush",0);
|
||||||
this.setMenuTile(0, 6, 74, "fiber_pen",0);
|
this.setMenuTile(2, 7, 73, "copper_eraser",0);
|
||||||
this.setMenuTile(1, 6, 75, "fiber_brush",0);
|
this.setMenuTile(3, 3, 79, "cleaner",0);
|
||||||
this.setMenuTile(2, 6, 76, "fiber_eraser",0);
|
}
|
||||||
this.setMenuTile(0, 5, 77, "transmuter_eraser",0);
|
if (worlds.getInformations().Tech>=0)
|
||||||
this.setMenuTile(2, 5, 78, "all_eraser",0);
|
{
|
||||||
this.setMenuTile(3, 3, 79, "cleaner",0);
|
this.setMenuTile(0, 5, 77, "transmuter_eraser",0);
|
||||||
|
}
|
||||||
|
if (worlds.getInformations().Tech>=2)
|
||||||
|
{
|
||||||
|
this.setMenuTile(1, 5, 70, "blank",0);
|
||||||
|
this.setMenuTile(0, 6, 74, "fiber_pen",0);
|
||||||
|
this.setMenuTile(1, 6, 75, "fiber_brush",0);
|
||||||
|
this.setMenuTile(2, 6, 76, "fiber_eraser",0);
|
||||||
|
this.setMenuTile(2, 5, 78, "all_eraser",0);
|
||||||
|
}
|
||||||
this.setMenuTransmuter(0, 7, "+", Angular.A00,0);
|
this.setMenuTransmuter(0, 7, "+", Angular.A00,0);
|
||||||
this.setMenuTransmuter(2, 7, "-", Angular.A00,0);
|
this.setMenuTransmuter(2, 7, "-", Angular.A00,0);
|
||||||
this.setMenuTransmuter(0, 6, "++", Angular.A00,0);
|
this.setMenuTransmuter(0, 6, "++", Angular.A00,0);
|
||||||
|
|
|
@ -35,19 +35,19 @@ public class Objectives extends Actor {
|
||||||
batch.end();
|
batch.end();
|
||||||
shaperenderer.begin(ShapeType.Filled);
|
shaperenderer.begin(ShapeType.Filled);
|
||||||
shaperenderer.setColor(AssetLoader.Typecolors[type]);
|
shaperenderer.setColor(AssetLoader.Typecolors[type]);
|
||||||
shaperenderer.rect(this.getX() + element * 40, this.getY(), 40,
|
shaperenderer.rect(this.getX() + element * 48, this.getY(), 48,
|
||||||
68);
|
68);
|
||||||
shaperenderer.end();
|
shaperenderer.end();
|
||||||
shaperenderer.begin(ShapeType.Line);
|
shaperenderer.begin(ShapeType.Line);
|
||||||
shaperenderer.setColor(1, 1, 1, 1);
|
shaperenderer.setColor(1, 1, 1, 1);
|
||||||
shaperenderer.rect(this.getX() + element * 40, this.getY(), 40,
|
shaperenderer.rect(this.getX() + element * 48, this.getY(), 48,
|
||||||
68);
|
68);
|
||||||
shaperenderer.end();
|
shaperenderer.end();
|
||||||
batch.begin();
|
batch.begin();
|
||||||
font.draw(batch, AssetLoader.Typenames[type], this.getX()
|
font.draw(batch, AssetLoader.Typenames[type], this.getX()
|
||||||
+ element * 40 + 2, this.getY() + 69);
|
+ element * 48 + 2, this.getY() + 69);
|
||||||
font2.draw(batch, String.valueOf(vict), this.getX() + element
|
font2.draw(batch, String.valueOf(vict), this.getX() + element
|
||||||
* 40 + 11, this.getY() + 35);
|
* 48 + 11, this.getY() + 35);
|
||||||
element += 1;
|
element += 1;
|
||||||
}
|
}
|
||||||
type += 1;
|
type += 1;
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class VertiBarre extends Actor {
|
||||||
Gdx.app.debug(getClass().getSimpleName(), "Menu:" + Barre.length+ " elements");
|
Gdx.app.debug(getClass().getSimpleName(), "Menu:" + Barre.length+ " elements");
|
||||||
for (int i = 0; i < Barre.length; i++)
|
for (int i = 0; i < Barre.length; i++)
|
||||||
{
|
{
|
||||||
if (Transmuter.Class.values()[i]!=Transmuter.Class.Scenario || worlds.isDebug())
|
if ((Transmuter.Class.values()[i]!=Transmuter.Class.Scenario && (worlds.getInformations().Tech>=0 || Transmuter.Class.values()[i]==Transmuter.Class.Structure)) || worlds.isDebug())
|
||||||
{
|
{
|
||||||
Barre[i] = new ImageTextButton(Transmuter.Class.values()[i].toString(), AssetLoader.Skin_level);
|
Barre[i] = new ImageTextButton(Transmuter.Class.values()[i].toString(), AssetLoader.Skin_level);
|
||||||
table.addActor(Barre[i]);
|
table.addActor(Barre[i]);
|
||||||
|
@ -61,7 +61,7 @@ public class VertiBarre extends Actor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buttonGroup.setMaxCheckCount(1);
|
buttonGroup.setMaxCheckCount(1);
|
||||||
buttonGroup.setMinCheckCount(0);
|
buttonGroup.setMinCheckCount(1);
|
||||||
buttonGroup.setUncheckLast(true);
|
buttonGroup.setUncheckLast(true);
|
||||||
this.setBounds(table.getX(),table.getY(),table.getWidth(),table.getHeight());
|
this.setBounds(table.getX(),table.getY(),table.getWidth(),table.getHeight());
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import fr.evolving.automata.Level;
|
||||||
|
|
||||||
public class InitWorlds {
|
public class InitWorlds {
|
||||||
public static Array<Level> go() {
|
public static Array<Level> go() {
|
||||||
Level[] thelevels = new Level[35];
|
Level[] thelevels = new Level[45];
|
||||||
|
|
||||||
thelevels[0] = new Level(
|
thelevels[0] = new Level(
|
||||||
0,
|
0,
|
||||||
|
@ -138,7 +138,7 @@ public class InitWorlds {
|
||||||
"",
|
"",
|
||||||
"He", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
"He", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 2 }, 30f, 350f,
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 2 }, 30f, 350f,
|
||||||
4, 1200, new Grid(20, 20), 0, 0, 0, 0, 800, 99999, 99999,
|
4, 1200, new Grid(20, 20), 0, 0, 0, 0, 700, 99999, 99999,
|
||||||
99999, "", false, new int[][] { { 1, 3 }, { 1, 5 } });
|
99999, "", false, new int[][] { { 1, 3 }, { 1, 5 } });
|
||||||
|
|
||||||
thelevels[12] = new Level(
|
thelevels[12] = new Level(
|
||||||
|
@ -149,7 +149,7 @@ public class InitWorlds {
|
||||||
"",
|
"",
|
||||||
"He", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
"He", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 2 }, 180f,
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 2 }, 180f,
|
||||||
230f, 4, 1300, new Grid(20, 20), 0, 0, 0, 0, 700, 99999, 99999,
|
230f, 4, 1300, new Grid(20, 20), 0, 0, 0, 0, 800, 99999, 99999,
|
||||||
99999, "", false, new int[][] { { 1, 4 } });
|
99999, "", false, new int[][] { { 1, 4 } });
|
||||||
|
|
||||||
thelevels[13] = new Level(
|
thelevels[13] = new Level(
|
||||||
|
@ -170,7 +170,7 @@ public class InitWorlds {
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"Li", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
"Li", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1 }, 300f,
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 3, 3 }, 300f,
|
||||||
490f, 4, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
490f, 4, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
99999, 99999, "", false, new int[][] { { 1, 6 } });
|
99999, 99999, "", false, new int[][] { { 1, 6 } });
|
||||||
|
|
||||||
|
@ -180,9 +180,9 @@ public class InitWorlds {
|
||||||
(int) (Math.random() * Integer.MAX_VALUE),
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"C", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
"Be", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1 }, 550f,
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 5, 4 }, 550f,
|
||||||
490f, 4, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
490f, 5, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
99999, 99999, "", false, new int[][] { { 1, 7 } });
|
99999, 99999, "", false, new int[][] { { 1, 7 } });
|
||||||
|
|
||||||
thelevels[16] = new Level(
|
thelevels[16] = new Level(
|
||||||
|
@ -191,9 +191,9 @@ public class InitWorlds {
|
||||||
(int) (Math.random() * Integer.MAX_VALUE),
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"O", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
"B", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1 }, 800f,
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 6, 5 }, 800f,
|
||||||
570f, 4, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
570f, 5, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
99999, 99999, "", false, new int[][] { { 1, 8 } });
|
99999, 99999, "", false, new int[][] { { 1, 8 } });
|
||||||
|
|
||||||
thelevels[17] = new Level(
|
thelevels[17] = new Level(
|
||||||
|
@ -202,60 +202,298 @@ public class InitWorlds {
|
||||||
(int) (Math.random() * Integer.MAX_VALUE),
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"Ne", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
"C", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 }, 1000f,
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 6, 6 }, 1000f,
|
||||||
750f, 6, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
750f, 6, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", true, new int[][] { {2,8} });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
thelevels[18] = new Level(
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"N", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 7, 7 }, 550f,
|
||||||
|
750f, 6, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {2,1} });
|
||||||
|
|
||||||
|
thelevels[19] = new Level(
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"N", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 8, 7 }, 800f,
|
||||||
|
620f, 6, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {2,2} });
|
||||||
|
|
||||||
|
thelevels[20] = new Level(
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"O", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 8, 8 }, 1050f,
|
||||||
|
470f, 6, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {2,3} });
|
||||||
|
|
||||||
|
thelevels[21] = new Level(
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"O", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 9, 8 }, 800f,
|
||||||
|
350f, 7, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {2,4} });
|
||||||
|
|
||||||
|
thelevels[22] = new Level(
|
||||||
|
2,
|
||||||
|
4,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"F", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 7, 1, 0, 10, 9 }, 550f,
|
||||||
|
200f, 7, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {2,5} });
|
||||||
|
|
||||||
|
thelevels[23] = new Level(
|
||||||
|
2,
|
||||||
|
5,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Ne", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 0, 0, 10, 10 }, 300f,
|
||||||
|
350f, 7, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {2,6},{2,8} });
|
||||||
|
|
||||||
|
thelevels[24] = new Level(
|
||||||
|
2,
|
||||||
|
6,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Ne", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 0, 0, 11, 10 }, 70f,
|
||||||
|
470f, 7, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {2,7} });
|
||||||
|
|
||||||
|
thelevels[25] = new Level(
|
||||||
|
2,
|
||||||
|
7,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Ne", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 0, 0, 12, 10 }, 300f,
|
||||||
|
620f, 8, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {2,8} });
|
||||||
|
|
||||||
|
thelevels[26] = new Level(
|
||||||
|
2,
|
||||||
|
8,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Na", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 1, 0, 12, 11 }, 550f,
|
||||||
|
480f, 8, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
99999, 99999, "", true, new int[][] { {} });
|
99999, 99999, "", true, new int[][] { {} });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
thelevels[27] = new Level(
|
||||||
|
3,
|
||||||
|
0,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Mg", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 2, 0, 12, 12 }, 280f,
|
||||||
|
330f, 8, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {3,1},{3,8} });
|
||||||
|
thelevels[28] = new Level(
|
||||||
|
3,
|
||||||
|
1,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Mg", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 2, 0, 13, 12 }, 580f,
|
||||||
|
330f, 8, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {3,2} });
|
||||||
|
thelevels[29] = new Level(
|
||||||
|
3,
|
||||||
|
2,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Mg", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 2, 0, 14, 12 }, 880f,
|
||||||
|
330f, 8, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {3,3} });
|
||||||
|
thelevels[30] = new Level(
|
||||||
|
3,
|
||||||
|
3,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Al", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 3, 0, 14, 13 }, 1050f,
|
||||||
|
550f, 9, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {3,4} });
|
||||||
|
thelevels[31] = new Level(
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Si", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 4, 0, 14, 14 }, 880f,
|
||||||
|
750f, 9, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {3,5} });
|
||||||
|
thelevels[32] = new Level(
|
||||||
|
3,
|
||||||
|
5,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Si", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 4, 0, 15, 14 }, 580f,
|
||||||
|
750f, 9, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {3,6} });
|
||||||
|
thelevels[33] = new Level(
|
||||||
|
3,
|
||||||
|
6,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Si", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 4, 0, 16, 14 }, 280f,
|
||||||
|
750f, 9 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {3,7} });
|
||||||
|
thelevels[34] = new Level(
|
||||||
|
3,
|
||||||
|
7,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Si", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 4, 0, 18, 14 }, 80f,
|
||||||
|
550f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", true, new int[][] { {} });
|
||||||
|
thelevels[35] = new Level(
|
||||||
|
3,
|
||||||
|
8,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"O", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 10, 8 }, 580f,
|
||||||
|
550f, 8 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {3,3} });
|
||||||
|
|
||||||
thelevels[18] = new Level(2, 1,
|
|
||||||
(int) (Math.random() * Integer.MAX_VALUE), "test",
|
thelevels[36] = new Level(
|
||||||
"C'est un test.", "e0", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
4,
|
||||||
0, 0, 0, 0 }, new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
|
0,
|
||||||
0, 0, 0 }, 38f, 740f, -1, 0, new Grid(20, 20), 0, 0, 0,
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
0, 99999, 99999, 99999, 99999, "", false,
|
"",
|
||||||
new int[][] { { 2, 2 } });
|
"",
|
||||||
|
"P", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
thelevels[19] = new Level(2, 2,
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 5, 0, 16, 15 }, 80f,
|
||||||
(int) (Math.random() * Integer.MAX_VALUE), "test",
|
500f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
"C'est un test.", "e0", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
99999, 99999, "", false, new int[][] { {4,1},{4,2},{4,3} });
|
||||||
0, 0, 0, 0 }, new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
|
thelevels[37] = new Level(
|
||||||
0, 0, 0 }, 238f, 340f, -1, 0, new Grid(20, 20), 0, 0,
|
4,
|
||||||
0, 0, 99999, 99999, 99999, 99999, "", false, new int[][] {});
|
1,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
thelevels[20] = new Level(3, 1,
|
"",
|
||||||
(int) (Math.random() * Integer.MAX_VALUE), "test",
|
"",
|
||||||
"C'est un test.", "e0", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
"S", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
0, 0, 0, 0 }, new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 6, 0, 16, 16 }, 320f,
|
||||||
0, 0, 0 }, 38f, 740f, -1, 0, new Grid(20, 20), 0, 0, 0,
|
750f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
0, 99999, 99999, 99999, 99999, "", false,
|
99999, 99999, "", false, new int[][] { {4,5} });
|
||||||
new int[][] { { 3, 2 } });
|
thelevels[38] = new Level(
|
||||||
|
4,
|
||||||
;
|
2,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
thelevels[21] = new Level(3, 2,
|
"",
|
||||||
(int) (Math.random() * Integer.MAX_VALUE), "test",
|
"",
|
||||||
"C'est un test.", "e0", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
"S", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
0, 0, 0, 0 }, new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 6, 0, 17, 16 }, 320f,
|
||||||
0, 0, 0 }, 438f, 540f, -1, 0, new Grid(20, 20), 0, 0,
|
500f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
0, 0, 99999, 99999, 99999, 99999, "", false, new int[][] {});
|
99999, 99999, "", false, new int[][] { {4,4} });
|
||||||
|
thelevels[39] = new Level(
|
||||||
thelevels[22] = new Level(4, 1,
|
4,
|
||||||
(int) (Math.random() * Integer.MAX_VALUE), "test",
|
3,
|
||||||
"C'est un test.", "e0", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
0, 0, 0, 0 }, new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
|
"",
|
||||||
0, 0, 0 }, 38f, 740f, -1, 0, new Grid(20, 20), 0, 0, 0,
|
"",
|
||||||
0, 99999, 99999, 99999, 99999, "", false,
|
"S", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
new int[][] { { 4, 2 } });
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 6, 0, 18, 16 }, 320f,
|
||||||
|
250f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
;
|
99999, 99999, "", false, new int[][] { {4,4} });
|
||||||
|
thelevels[40] = new Level(
|
||||||
thelevels[23] = new Level(4, 2,
|
4,
|
||||||
(int) (Math.random() * Integer.MAX_VALUE), "test",
|
4,
|
||||||
"C'est un test.", "e0", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
0, 0, 0, 0 }, new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
|
"",
|
||||||
0, 0, 0 }, 238f, 640f, -1, 0, new Grid(20, 20), 0, 0,
|
"",
|
||||||
0, 0, 99999, 99999, 99999, 99999, "", false, new int[][] {});
|
"S", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 6, 0, 20, 16 }, 550f,
|
||||||
|
380f, 11 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {4,6} });
|
||||||
|
thelevels[41] = new Level(
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Cl", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 7, 0, 18, 17 }, 550f,
|
||||||
|
750f, 11 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {4,6} });
|
||||||
|
thelevels[42] = new Level(
|
||||||
|
4,
|
||||||
|
6,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Cl", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 7, 0, 20, 17 }, 780f,
|
||||||
|
580f, 11 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", false, new int[][] { {4,7},{4,8} });
|
||||||
|
thelevels[43] = new Level(
|
||||||
|
4,
|
||||||
|
7,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Ar", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 8, 0, 18, 18 }, 1000f,
|
||||||
|
750f, 12 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", true, new int[][] { {} });
|
||||||
|
thelevels[44] = new Level(
|
||||||
|
4,
|
||||||
|
8,
|
||||||
|
(int) (Math.random() * Integer.MAX_VALUE),
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Ar", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 8, 0, 20, 18 }, 1000f,
|
||||||
|
380f, 12 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
|
||||||
|
99999, 99999, "", true, new int[][] { {} });
|
||||||
|
|
||||||
|
|
||||||
return new Array<Level>(thelevels);
|
return new Array<Level>(thelevels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class Worlds extends Actor {
|
||||||
state=State.notloaded;
|
state=State.notloaded;
|
||||||
this.load(name);
|
this.load(name);
|
||||||
this.ReadTransmuters();
|
this.ReadTransmuters();
|
||||||
if (state==State.notloaded)
|
//if (state==State.notloaded)
|
||||||
create(name);
|
create(name);
|
||||||
onchanged();
|
onchanged();
|
||||||
}
|
}
|
||||||
|
@ -172,6 +172,7 @@ public class Worlds extends Actor {
|
||||||
public void setWorld(int world) {
|
public void setWorld(int world) {
|
||||||
if (state!=State.notloaded)
|
if (state!=State.notloaded)
|
||||||
if (world<getMaxWorlds()) {
|
if (world<getMaxWorlds()) {
|
||||||
|
delLevel();
|
||||||
usedworld=world;
|
usedworld=world;
|
||||||
onchanged();
|
onchanged();
|
||||||
}
|
}
|
||||||
|
@ -180,6 +181,7 @@ public class Worlds extends Actor {
|
||||||
public void NextWorld() {
|
public void NextWorld() {
|
||||||
if (state!=State.notloaded)
|
if (state!=State.notloaded)
|
||||||
if (usedworld<getMaxWorlds()) {
|
if (usedworld<getMaxWorlds()) {
|
||||||
|
delLevel();
|
||||||
usedworld++;
|
usedworld++;
|
||||||
onchanged();
|
onchanged();
|
||||||
}
|
}
|
||||||
|
@ -188,6 +190,7 @@ public class Worlds extends Actor {
|
||||||
public void PreviousWorld() {
|
public void PreviousWorld() {
|
||||||
if (state!=State.notloaded)
|
if (state!=State.notloaded)
|
||||||
if (usedworld>0) {
|
if (usedworld>0) {
|
||||||
|
delLevel();
|
||||||
usedworld--;
|
usedworld--;
|
||||||
onchanged();
|
onchanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,10 +33,10 @@ public class GameRenderer {
|
||||||
} else if (layer == 1) {
|
} else if (layer == 1) {
|
||||||
batcher.begin();
|
batcher.begin();
|
||||||
batcher.setColor(0.25f, 0.25f, 0.25f, 1f);
|
batcher.setColor(0.25f, 0.25f, 0.25f, 1f);
|
||||||
batcher.draw(AssetLoader.Atlas_level.findRegion("barrehaut"), 0.0f,
|
if (GameScreen.worlds.getInformations().Cout>0 || GameScreen.worlds.getInformations().Tech>=1 ) {
|
||||||
AssetLoader.height - 198.0f, 1920.0f, 200.0f);
|
batcher.draw(AssetLoader.Atlas_level.findRegion("barrehaut"), 0.0f, AssetLoader.height - 198.0f, 1920.0f, 200.0f);
|
||||||
batcher.draw(AssetLoader.Atlas_level.findRegion("barrecentre"),
|
batcher.draw(AssetLoader.Atlas_level.findRegion("barrecentre"), 1480f, AssetLoader.height - 785.0f, 590f, 530.0f);
|
||||||
1480f, AssetLoader.height - 785.0f, 590f, 530.0f);
|
}
|
||||||
batcher.draw(AssetLoader.Atlas_level.findRegion("barrebas"), 0.0f,
|
batcher.draw(AssetLoader.Atlas_level.findRegion("barrebas"), 0.0f,
|
||||||
0.0f, 1920.0f, 170.0f);
|
0.0f, 1920.0f, 170.0f);
|
||||||
if (GameScreen.unroll)
|
if (GameScreen.unroll)
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class GameScreen implements Screen {
|
||||||
private Label fpsLabel, info_nom;
|
private Label fpsLabel, info_nom;
|
||||||
private TextArea info_desc, tooltip;
|
private TextArea info_desc, tooltip;
|
||||||
public boolean unroll;
|
public boolean unroll;
|
||||||
private Worlds worlds;
|
public Worlds worlds;
|
||||||
|
|
||||||
public enum calling {
|
public enum calling {
|
||||||
mouseover, mouseclick, mousedrag, longpress, tap, taptap, zoom, fling, pan, pinch
|
mouseover, mouseclick, mousedrag, longpress, tap, taptap, zoom, fling, pan, pinch
|
||||||
|
@ -680,11 +680,14 @@ public class GameScreen implements Screen {
|
||||||
stage_info.addActor(info_desc);
|
stage_info.addActor(info_desc);
|
||||||
//stage_tooltip.addActor(tooltip);
|
//stage_tooltip.addActor(tooltip);
|
||||||
stage.addActor(horizbar);
|
stage.addActor(horizbar);
|
||||||
stage.addActor(vertibar);
|
if (worlds.getInformations().Cout>0 || worlds.getInformations().Tech>=1 ) {
|
||||||
|
stage.addActor(vertibar);
|
||||||
|
stage.addActor(buttonlevel);
|
||||||
|
stage.addActor(menu);
|
||||||
|
}
|
||||||
stage.addActor(nextpage);
|
stage.addActor(nextpage);
|
||||||
stage.addActor(previouspage);
|
stage.addActor(previouspage);
|
||||||
stage.addActor(objectives);
|
stage.addActor(objectives);
|
||||||
stage.addActor(buttonlevel);
|
|
||||||
stage.addActor(rayon);
|
stage.addActor(rayon);
|
||||||
stage.addActor(nrj);
|
stage.addActor(nrj);
|
||||||
if (Preference.prefs.getBoolean("Refresh"))
|
if (Preference.prefs.getBoolean("Refresh"))
|
||||||
|
@ -694,7 +697,6 @@ public class GameScreen implements Screen {
|
||||||
stage.addActor(tech);
|
stage.addActor(tech);
|
||||||
stage.addActor(cout);
|
stage.addActor(cout);
|
||||||
stage.addActor(research);
|
stage.addActor(research);
|
||||||
stage.addActor(menu);
|
|
||||||
gesturedetector=new GestureDetector(map);
|
gesturedetector=new GestureDetector(map);
|
||||||
//processors.add(stage_tooltip);
|
//processors.add(stage_tooltip);
|
||||||
processors.add(stage_info);
|
processors.add(stage_info);
|
||||||
|
|
|
@ -249,9 +249,9 @@ public class LevelScreen implements Screen {
|
||||||
stage.addActor(buttonLevels[j]);
|
stage.addActor(buttonLevels[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Gdx.app.debug(getClass().getSimpleName(), "Mise en place du level 0.");
|
/*Gdx.app.debug(getClass().getSimpleName(), "Mise en place du level 0.");
|
||||||
buttonLevels[0].setChecked(true);
|
buttonLevels[0].setChecked(true);
|
||||||
showlevel(buttonLevels[0]);
|
showlevel(buttonLevels[0]);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public LevelScreen(Worlds aworlds) {
|
public LevelScreen(Worlds aworlds) {
|
||||||
|
@ -269,11 +269,14 @@ public class LevelScreen implements Screen {
|
||||||
buttonLevels[j].setChecked(false);
|
buttonLevels[j].setChecked(false);
|
||||||
if (worlds.getInformations()!=null && buttonLevels[j].level.id == worlds.getInformations().id) {
|
if (worlds.getInformations()!=null && buttonLevels[j].level.id == worlds.getInformations().id) {
|
||||||
selected=buttonLevels[j];
|
selected=buttonLevels[j];
|
||||||
selected.setChecked(true);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (worlds.getInformations()==null)
|
||||||
|
selected=buttonLevels[0];
|
||||||
|
selected.setChecked(true);
|
||||||
|
showlevel(selected);
|
||||||
Previous.setVisible(true);
|
Previous.setVisible(true);
|
||||||
Next.setVisible(true);
|
Next.setVisible(true);
|
||||||
buttonPlay.setVisible(true);
|
buttonPlay.setVisible(true);
|
||||||
|
|
Loading…
Reference in New Issue