diff --git a/core/src/fr/evolving/UI/Menu.java b/core/src/fr/evolving/UI/Menu.java index 007e975..b1f365f 100644 --- a/core/src/fr/evolving/UI/Menu.java +++ b/core/src/fr/evolving/UI/Menu.java @@ -230,16 +230,25 @@ public class Menu extends Actor { public void update() { clearall(); - this.setMenuTile(0, 7, 71, "copper_pen",0); - this.setMenuTile(1, 7, 72, "copper_brush",0); - this.setMenuTile(2, 7, 73, "copper_eraser",0); - 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(0, 5, 77, "transmuter_eraser",0); - this.setMenuTile(2, 5, 78, "all_eraser",0); - this.setMenuTile(3, 3, 79, "cleaner",0); + if (worlds.getInformations().Cout>=0) + { + this.setMenuTile(0, 7, 71, "copper_pen",0); + this.setMenuTile(1, 7, 72, "copper_brush",0); + this.setMenuTile(2, 7, 73, "copper_eraser",0); + this.setMenuTile(3, 3, 79, "cleaner",0); + } + if (worlds.getInformations().Tech>=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(2, 7, "-", Angular.A00,0); this.setMenuTransmuter(0, 6, "++", Angular.A00,0); diff --git a/core/src/fr/evolving/UI/Objectives.java b/core/src/fr/evolving/UI/Objectives.java index fd6d423..256bae1 100644 --- a/core/src/fr/evolving/UI/Objectives.java +++ b/core/src/fr/evolving/UI/Objectives.java @@ -35,19 +35,19 @@ public class Objectives extends Actor { batch.end(); shaperenderer.begin(ShapeType.Filled); shaperenderer.setColor(AssetLoader.Typecolors[type]); - shaperenderer.rect(this.getX() + element * 40, this.getY(), 40, + shaperenderer.rect(this.getX() + element * 48, this.getY(), 48, 68); shaperenderer.end(); shaperenderer.begin(ShapeType.Line); 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); shaperenderer.end(); batch.begin(); 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 - * 40 + 11, this.getY() + 35); + * 48 + 11, this.getY() + 35); element += 1; } type += 1; diff --git a/core/src/fr/evolving/UI/VertiBarre.java b/core/src/fr/evolving/UI/VertiBarre.java index 68d930d..93676be 100644 --- a/core/src/fr/evolving/UI/VertiBarre.java +++ b/core/src/fr/evolving/UI/VertiBarre.java @@ -35,7 +35,7 @@ public class VertiBarre extends Actor { Gdx.app.debug(getClass().getSimpleName(), "Menu:" + Barre.length+ " elements"); 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); table.addActor(Barre[i]); @@ -61,7 +61,7 @@ public class VertiBarre extends Actor { } } buttonGroup.setMaxCheckCount(1); - buttonGroup.setMinCheckCount(0); + buttonGroup.setMinCheckCount(1); buttonGroup.setUncheckLast(true); this.setBounds(table.getX(),table.getY(),table.getWidth(),table.getHeight()); } diff --git a/core/src/fr/evolving/assets/InitWorlds.java b/core/src/fr/evolving/assets/InitWorlds.java index 650b5fc..873b8f1 100644 --- a/core/src/fr/evolving/assets/InitWorlds.java +++ b/core/src/fr/evolving/assets/InitWorlds.java @@ -7,7 +7,7 @@ import fr.evolving.automata.Level; public class InitWorlds { public static Array go() { - Level[] thelevels = new Level[35]; + Level[] thelevels = new Level[45]; thelevels[0] = new Level( 0, @@ -138,7 +138,7 @@ public class InitWorlds { "", "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, - 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 } }); 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 }, 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 } }); 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 }, - 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, 99999, 99999, "", false, new int[][] { { 1, 6 } }); @@ -180,9 +180,9 @@ public class InitWorlds { (int) (Math.random() * Integer.MAX_VALUE), "", "", - "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, 0, 0, 0, 1, 1 }, 550f, - 490f, 4, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, + "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, 2, 2, 0, 0, 5, 4 }, 550f, + 490f, 5, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 99999, 99999, "", false, new int[][] { { 1, 7 } }); thelevels[16] = new Level( @@ -191,9 +191,9 @@ public class InitWorlds { (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, 1, 0, 0, 0, 1, 1 }, 800f, - 570f, 4, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, + "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, 2, 3, 0, 0, 6, 5 }, 800f, + 570f, 5, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 99999, 99999, "", false, new int[][] { { 1, 8 } }); thelevels[17] = new Level( @@ -202,60 +202,298 @@ public class InitWorlds { (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, 1, 1, 1, 1, 1, 1 }, 1000f, + "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, 2, 4, 0, 0, 6, 6 }, 1000f, 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[][] { {} }); + + + + 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", - "C'est un test.", "e0", new int[] { 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, - 0, 0, 0 }, 38f, 740f, -1, 0, new Grid(20, 20), 0, 0, 0, - 0, 99999, 99999, 99999, 99999, "", false, - new int[][] { { 2, 2 } }); - - thelevels[19] = new Level(2, 2, - (int) (Math.random() * Integer.MAX_VALUE), "test", - "C'est un test.", "e0", new int[] { 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, - 0, 0, 0 }, 238f, 340f, -1, 0, new Grid(20, 20), 0, 0, - 0, 0, 99999, 99999, 99999, 99999, "", false, new int[][] {}); - - 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, - 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, - new int[][] { { 3, 2 } }); - - ; - - 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, - 0, 0, 0, 0 }, new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0 }, 438f, 540f, -1, 0, new Grid(20, 20), 0, 0, - 0, 0, 99999, 99999, 99999, 99999, "", false, new int[][] {}); - - thelevels[22] = new Level(4, 1, - (int) (Math.random() * Integer.MAX_VALUE), "test", - "C'est un test.", "e0", new int[] { 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, - 0, 0, 0 }, 38f, 740f, -1, 0, new Grid(20, 20), 0, 0, 0, - 0, 99999, 99999, 99999, 99999, "", false, - new int[][] { { 4, 2 } }); - - ; - - thelevels[23] = new Level(4, 2, - (int) (Math.random() * Integer.MAX_VALUE), "test", - "C'est un test.", "e0", new int[] { 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, - 0, 0, 0 }, 238f, 640f, -1, 0, new Grid(20, 20), 0, 0, - 0, 0, 99999, 99999, 99999, 99999, "", false, new int[][] {}); - + + thelevels[36] = new Level( + 4, + 0, + (int) (Math.random() * Integer.MAX_VALUE), + "", + "", + "P", 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, 5, 0, 16, 15 }, 80f, + 500f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, + 99999, 99999, "", false, new int[][] { {4,1},{4,2},{4,3} }); + thelevels[37] = new Level( + 4, + 1, + (int) (Math.random() * Integer.MAX_VALUE), + "", + "", + "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, 16, 16 }, 320f, + 750f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, + 99999, 99999, "", false, new int[][] { {4,5} }); + thelevels[38] = new Level( + 4, + 2, + (int) (Math.random() * Integer.MAX_VALUE), + "", + "", + "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, 17, 16 }, 320f, + 500f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, + 99999, 99999, "", false, new int[][] { {4,4} }); + thelevels[39] = new Level( + 4, + 3, + (int) (Math.random() * Integer.MAX_VALUE), + "", + "", + "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, 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( + 4, + 4, + (int) (Math.random() * Integer.MAX_VALUE), + "", + "", + "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(thelevels); } diff --git a/core/src/fr/evolving/automata/Worlds.java b/core/src/fr/evolving/automata/Worlds.java index 544a0b9..1bf6116 100644 --- a/core/src/fr/evolving/automata/Worlds.java +++ b/core/src/fr/evolving/automata/Worlds.java @@ -41,7 +41,7 @@ public class Worlds extends Actor { state=State.notloaded; this.load(name); this.ReadTransmuters(); - if (state==State.notloaded) + //if (state==State.notloaded) create(name); onchanged(); } @@ -172,6 +172,7 @@ public class Worlds extends Actor { public void setWorld(int world) { if (state!=State.notloaded) if (world0) { + delLevel(); usedworld--; onchanged(); } diff --git a/core/src/fr/evolving/renderers/GameRenderer.java b/core/src/fr/evolving/renderers/GameRenderer.java index e875474..eb83cdb 100644 --- a/core/src/fr/evolving/renderers/GameRenderer.java +++ b/core/src/fr/evolving/renderers/GameRenderer.java @@ -33,10 +33,10 @@ public class GameRenderer { } else if (layer == 1) { batcher.begin(); batcher.setColor(0.25f, 0.25f, 0.25f, 1f); - batcher.draw(AssetLoader.Atlas_level.findRegion("barrehaut"), 0.0f, - AssetLoader.height - 198.0f, 1920.0f, 200.0f); - batcher.draw(AssetLoader.Atlas_level.findRegion("barrecentre"), - 1480f, AssetLoader.height - 785.0f, 590f, 530.0f); + if (GameScreen.worlds.getInformations().Cout>0 || GameScreen.worlds.getInformations().Tech>=1 ) { + batcher.draw(AssetLoader.Atlas_level.findRegion("barrehaut"), 0.0f, AssetLoader.height - 198.0f, 1920.0f, 200.0f); + batcher.draw(AssetLoader.Atlas_level.findRegion("barrecentre"), 1480f, AssetLoader.height - 785.0f, 590f, 530.0f); + } batcher.draw(AssetLoader.Atlas_level.findRegion("barrebas"), 0.0f, 0.0f, 1920.0f, 170.0f); if (GameScreen.unroll) diff --git a/core/src/fr/evolving/screens/GameScreen.java b/core/src/fr/evolving/screens/GameScreen.java index 03bd32d..25b24db 100644 --- a/core/src/fr/evolving/screens/GameScreen.java +++ b/core/src/fr/evolving/screens/GameScreen.java @@ -106,7 +106,7 @@ public class GameScreen implements Screen { private Label fpsLabel, info_nom; private TextArea info_desc, tooltip; public boolean unroll; - private Worlds worlds; + public Worlds worlds; public enum calling { 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_tooltip.addActor(tooltip); 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(previouspage); stage.addActor(objectives); - stage.addActor(buttonlevel); stage.addActor(rayon); stage.addActor(nrj); if (Preference.prefs.getBoolean("Refresh")) @@ -694,7 +697,6 @@ public class GameScreen implements Screen { stage.addActor(tech); stage.addActor(cout); stage.addActor(research); - stage.addActor(menu); gesturedetector=new GestureDetector(map); //processors.add(stage_tooltip); processors.add(stage_info); diff --git a/core/src/fr/evolving/screens/LevelScreen.java b/core/src/fr/evolving/screens/LevelScreen.java index 5e6a692..4aaac86 100644 --- a/core/src/fr/evolving/screens/LevelScreen.java +++ b/core/src/fr/evolving/screens/LevelScreen.java @@ -249,9 +249,9 @@ public class LevelScreen implements Screen { 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); - showlevel(buttonLevels[0]); + showlevel(buttonLevels[0]);*/ } public LevelScreen(Worlds aworlds) { @@ -269,11 +269,14 @@ public class LevelScreen implements Screen { buttonLevels[j].setChecked(false); if (worlds.getInformations()!=null && buttonLevels[j].level.id == worlds.getInformations().id) { selected=buttonLevels[j]; - selected.setChecked(true); break; } } } + if (worlds.getInformations()==null) + selected=buttonLevels[0]; + selected.setChecked(true); + showlevel(selected); Previous.setVisible(true); Next.setVisible(true); buttonPlay.setVisible(true);