feat: ajout des récompenses et leur édition, modification de l'object victory pour un affichage de l'état actuel

This commit is contained in:
Nicolas Hordé 2016-02-18 21:25:55 +01:00
parent 6af02b7d9c
commit a598faece3
5 changed files with 118 additions and 61 deletions

View File

@ -44,12 +44,22 @@ public class Objectives extends Actor {
int element = 0; int element = 0;
int type = 0; int type = 0;
boolean flag =false; boolean flag =false;
for (int vict : Victory) { int[] thevictory,currentvictory;
if (vict != 0) { if (Victory!=null) {
thevictory=Victory;
currentvictory=Victory;
}
else
{
thevictory=worlds.getInformations().Victory_orig;
currentvictory=worlds.getInformations().Victory;
}
for (int i=0;i<thevictory.length;i++) {
if (thevictory[i] != 0) {
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 * size, this.getY(), size, 68); shaperenderer.rect(this.getX() + element * size, this.getY(), size, 68*currentvictory[i]/thevictory[i]);
shaperenderer.end(); shaperenderer.end();
shaperenderer.begin(ShapeType.Line); shaperenderer.begin(ShapeType.Line);
shaperenderer.setColor(1, 1, 1, 1); shaperenderer.setColor(1, 1, 1, 1);
@ -57,8 +67,8 @@ public class Objectives extends Actor {
shaperenderer.end(); shaperenderer.end();
batch.begin(); batch.begin();
font.draw(batch, AssetLoader.Typenames[type], this.getX()+ element * size + 2, this.getY() + 69); font.draw(batch, AssetLoader.Typenames[type], this.getX()+ element * size + 2, this.getY() + 69);
if (vict>0) if (thevictory[i] >0)
font2.draw(batch, String.valueOf(vict), this.getX() + element * size + 11, this.getY() + 35); font2.draw(batch, String.valueOf(thevictory[i]), this.getX() + element * size + 11, this.getY() + 35);
else else
{ {
font2.draw(batch, "??", this.getX() + element * size + 11, this.getY() + 35); font2.draw(batch, "??", this.getX() + element * size + 11, this.getY() + 35);
@ -70,7 +80,7 @@ public class Objectives extends Actor {
} }
if (flag) if (flag)
batch.draw(Next, this.getX() + element * size+11, this.getY()+15); batch.draw(Next, this.getX() + element * size+11, this.getY()+15);
else if (worlds.isDebug() && element<5) else if (worlds.isDebug() && element<5 && Victory!=null)
batch.draw(Add, this.getX() + element * size+11, this.getY()+15); batch.draw(Add, this.getX() + element * size+11, this.getY()+15);
} }

View File

@ -15,7 +15,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"e0", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "e0", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 38f, 740f, 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, -1, 0, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 99999,
99999, "", false, new int[][] { { 0, 1 }, { 0, 8 } }); 99999, "", false, new int[][] { { 0, 1 }, { 0, 8 } });
@ -26,7 +26,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"e0", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "e0", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 38f, 260f, new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 38f, 260f,
-1, 0, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 99999, -1, 0, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 99999,
99999, "", false, new int[][] { { 0, 2 } }); 99999, "", false, new int[][] { { 0, 2 } });
@ -37,7 +37,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"e0", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "e0", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 180f, new int[] { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 180f,
460f, -1, 15, new Grid(10, 3), 0, 0, 0, 0, 99999, 99999, 99999, 460f, -1, 15, new Grid(10, 3), 0, 0, 0, 0, 99999, 99999, 99999,
99999, "", false, new int[][] { { 0, 3 } }); 99999, "", false, new int[][] { { 0, 3 } });
@ -48,7 +48,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"e+", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "e+", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0 }, 380f, new int[] { 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0 }, 380f,
550f, 0, 16, new Grid(30, 20), 0, 0, 0, 0, 99999, 99999, 99999, 550f, 0, 16, new Grid(30, 20), 0, 0, 0, 0, 99999, 99999, 99999,
99999, "", false, new int[][] { { 0, 4 } }); 99999, "", false, new int[][] { { 0, 4 } });
@ -59,7 +59,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"E-", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "E-", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 590f, new int[] { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 590f,
550f, 0, 16, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 99999, 550f, 0, 16, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 99999,
99999, "", false, new int[][] { { 0, 5 } }); 99999, "", false, new int[][] { { 0, 5 } });
@ -70,7 +70,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"e0", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "e0", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 590f, new int[] { 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 590f,
220f, 1, 136, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 220f, 1, 136, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { { 0, 6 } }); 99999, 99999, "", false, new int[][] { { 0, 6 } });
@ -81,7 +81,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"eX", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "eX", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0 }, 790f, new int[] { 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0 }, 790f,
220f, 2, 230, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 220f, 2, 230, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { { 0, 7 } }); 99999, 99999, "", false, new int[][] { { 0, 7 } });
@ -92,7 +92,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"p", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "p", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 }, 950f, new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 }, 950f,
400f, 2, 370, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 400f, 2, 370, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { { 0, 8 } }); 99999, 99999, "", false, new int[][] { { 0, 8 } });
@ -103,7 +103,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"H", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "H", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }, 1050f, new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }, 1050f,
740f, 3, 750, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 740f, 3, 750, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", true, new int[][] { { 1, 0 }, { 1, 2 } }); 99999, 99999, "", true, new int[][] { { 1, 0 }, { 1, 2 } });
@ -114,7 +114,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"D", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "D", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1 }, 30f, 700f, new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1 }, 30f, 700f,
4, 1100, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 99999, 4, 1100, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 99999,
99999, "", false, new int[][] { { 1, 1 } }); 99999, "", false, new int[][] { { 1, 1 } });
@ -125,7 +125,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"T", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "T", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 1 }, 420f, new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 1 }, 420f,
750f, 4, 1000, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999, 750f, 4, 1000, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {} }); 99999, 99999, "", false, new int[][] { {} });
@ -136,7 +136,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"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 },
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, 700, 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 } });
@ -147,7 +147,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"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 },
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, 800, 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 } });
@ -158,7 +158,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"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 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 6, 2 }, 420f, new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 6, 2 }, 420f,
230f, 5, 1500, new Grid(20, 20), 0, 0, 0, 0, 1800, 99999, 230f, 5, 1500, new Grid(20, 20), 0, 0, 0, 0, 1800, 99999,
99999, 99999, "", false, new int[][] { {} }); 99999, 99999, "", false, new int[][] { {} });
@ -169,7 +169,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"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 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 3, 3 }, 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,7 +180,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Be", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Be", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 5, 4 }, 550f, 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, 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 } });
@ -191,7 +191,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"B", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "B", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 6, 5 }, 800f, 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, 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 } });
@ -202,7 +202,7 @@ 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 }, "C", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 6, 6 }, 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} }); 99999, 99999, "", true, new int[][] { {2,8} });
@ -215,7 +215,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"N", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "N", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 7, 7 }, 550f, 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, 750f, 6, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {2,1} }); 99999, 99999, "", false, new int[][] { {2,1} });
@ -226,7 +226,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"N", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "N", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 8, 7 }, 800f, 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, 620f, 6, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {2,2} }); 99999, 99999, "", false, new int[][] { {2,2} });
@ -237,7 +237,7 @@ 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 }, "O", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 8, 8 }, 1050f, 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, 470f, 6, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {2,3} }); 99999, 99999, "", false, new int[][] { {2,3} });
@ -248,7 +248,7 @@ 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 }, "O", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 9, 8 }, 800f, 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, 350f, 7, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {2,4} }); 99999, 99999, "", false, new int[][] { {2,4} });
@ -259,7 +259,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"F", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "F", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 7, 1, 0, 10, 9 }, 550f, 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, 200f, 7, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {2,5} }); 99999, 99999, "", false, new int[][] { {2,5} });
@ -270,7 +270,7 @@ 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 }, "Ne", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 0, 0, 10, 10 }, 300f, 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, 350f, 7, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {2,6},{2,8} }); 99999, 99999, "", false, new int[][] { {2,6},{2,8} });
@ -281,7 +281,7 @@ 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 }, "Ne", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 0, 0, 11, 10 }, 70f, 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, 470f, 7, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {2,7} }); 99999, 99999, "", false, new int[][] { {2,7} });
@ -292,7 +292,7 @@ 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 }, "Ne", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 0, 0, 12, 10 }, 300f, 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, 620f, 8, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {2,8} }); 99999, 99999, "", false, new int[][] { {2,8} });
@ -303,7 +303,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Na", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Na", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 1, 0, 12, 11 }, 550f, 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, 480f, 8, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", true, new int[][] { {} }); 99999, 99999, "", true, new int[][] { {} });
@ -316,7 +316,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Mg", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Mg", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 2, 0, 12, 12 }, 280f, 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, 330f, 8, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {3,1},{3,8} }); 99999, 99999, "", false, new int[][] { {3,1},{3,8} });
@ -326,7 +326,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Mg", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Mg", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 2, 0, 13, 12 }, 580f, 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, 330f, 8, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {3,2} }); 99999, 99999, "", false, new int[][] { {3,2} });
@ -336,7 +336,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Mg", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Mg", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 2, 0, 14, 12 }, 880f, 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, 330f, 8, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {3,3} }); 99999, 99999, "", false, new int[][] { {3,3} });
@ -346,7 +346,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Al", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Al", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 3, 0, 14, 13 }, 1050f, 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, 550f, 9, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {3,4} }); 99999, 99999, "", false, new int[][] { {3,4} });
@ -356,7 +356,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Si", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Si", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 4, 0, 14, 14 }, 880f, 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, 750f, 9, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {3,5} }); 99999, 99999, "", false, new int[][] { {3,5} });
@ -366,7 +366,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Si", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Si", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 4, 0, 15, 14 }, 580f, 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, 750f, 9, 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {3,6} }); 99999, 99999, "", false, new int[][] { {3,6} });
@ -376,7 +376,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Si", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Si", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 4, 0, 16, 14 }, 280f, 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, 750f, 9 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {3,7} }); 99999, 99999, "", false, new int[][] { {3,7} });
@ -386,7 +386,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Si", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Si", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 4, 0, 18, 14 }, 80f, 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, 550f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", true, new int[][] { {} }); 99999, 99999, "", true, new int[][] { {} });
@ -396,7 +396,7 @@ 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 }, "O", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 10, 8 }, 580f, 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, 550f, 8 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {3,3} }); 99999, 99999, "", false, new int[][] { {3,3} });
@ -408,7 +408,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"P", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "P", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 5, 0, 16, 15 }, 80f, 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, 500f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {4,1},{4,2},{4,3} }); 99999, 99999, "", false, new int[][] { {4,1},{4,2},{4,3} });
@ -418,7 +418,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"S", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "S", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 6, 0, 16, 16 }, 320f, 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, 750f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {4,5} }); 99999, 99999, "", false, new int[][] { {4,5} });
@ -428,7 +428,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"S", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "S", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 6, 0, 17, 16 }, 320f, 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, 500f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {4,4} }); 99999, 99999, "", false, new int[][] { {4,4} });
@ -438,7 +438,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"S", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "S", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 6, 0, 18, 16 }, 320f, 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, 250f, 10 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {4,4} }); 99999, 99999, "", false, new int[][] { {4,4} });
@ -448,7 +448,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"S", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "S", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 6, 0, 20, 16 }, 550f, 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, 380f, 11 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {4,6} }); 99999, 99999, "", false, new int[][] { {4,6} });
@ -458,7 +458,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Cl", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Cl", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 7, 0, 18, 17 }, 550f, 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, 750f, 11 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {4,6} }); 99999, 99999, "", false, new int[][] { {4,6} });
@ -468,7 +468,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Cl", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Cl", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 7, 0, 20, 17 }, 780f, 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, 580f, 11 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", false, new int[][] { {4,7},{4,8} }); 99999, 99999, "", false, new int[][] { {4,7},{4,8} });
@ -478,7 +478,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Ar", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Ar", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 8, 0, 18, 18 }, 1000f, 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, 750f, 12 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", true, new int[][] { {} }); 99999, 99999, "", true, new int[][] { {} });
@ -488,7 +488,7 @@ public class InitWorlds {
(int) (Math.random() * Integer.MAX_VALUE), (int) (Math.random() * Integer.MAX_VALUE),
"", "",
"", "",
"Ar", new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, "Ar", new int[] { 0, 0, 0, 0, 0, 0 },
new int[] { 0, 0, 0, 0, 0, 0, 0, 2, 8, 8, 0, 20, 18 }, 1000f, 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, 380f, 12 , 1200, new Grid(20, 20), 0, 0, 0, 0, 99999, 99999,
99999, 99999, "", true, new int[][] { {} }); 99999, 99999, "", true, new int[][] { {} });

View File

@ -20,6 +20,7 @@ public class Level implements Serializable {
public boolean Special; public boolean Special;
public String Tuto; public String Tuto;
public int[][] Link; public int[][] Link;
public int[] rewards;
public int[] Victory_orig; public int[] Victory_orig;
public int Cout_orig; public int Cout_orig;
@ -52,7 +53,7 @@ public class Level implements Serializable {
this.Name = Name; this.Name = Name;
this.Description = Description; this.Description = Description;
this.Element = Element; this.Element = Element;
this.Victory = Current; this.rewards = Current;
this.Victory_orig = Victory; this.Victory_orig = Victory;
this.X = X; this.X = X;
this.Y = Y; this.Y = Y;

View File

@ -259,7 +259,6 @@ public class GameScreen implements Screen {
research = new IconValue(Icon.research,worlds, AssetLoader.Skin_level); research = new IconValue(Icon.research,worlds, AssetLoader.Skin_level);
research.setPosition(1545, AssetLoader.height - 74); research.setPosition(1545, AssetLoader.height - 74);
objectives = new Objectives(worlds); objectives = new Objectives(worlds);
objectives.setVictory(level.Victory);
objectives.setPosition(890, AssetLoader.height - 95); objectives.setPosition(890, AssetLoader.height - 95);
objectives.setVisible(level.Cout>0); objectives.setVisible(level.Cout>0);
buttonlevel = new ButtonLevel(level, 1.0f, false); buttonlevel = new ButtonLevel(level, 1.0f, false);
@ -698,7 +697,7 @@ public class GameScreen implements Screen {
stage_info.addActor(info_cout); stage_info.addActor(info_cout);
stage_info.addActor(info_up); stage_info.addActor(info_up);
stage_info.addActor(info_desc); stage_info.addActor(info_desc);
stage_tooltip.addActor(tooltip); //stage_tooltip.addActor(tooltip);
stage.addActor(horizbar); stage.addActor(horizbar);
if (worlds.getInformations().Cout>0 || worlds.getInformations().Tech>=1 || worlds.isDebug()) { if (worlds.getInformations().Cout>0 || worlds.getInformations().Tech>=1 || worlds.isDebug()) {
stage.addActor(vertibar); stage.addActor(vertibar);

View File

@ -77,6 +77,12 @@ public class LevelScreen implements Screen {
cout.setVisible(false); cout.setVisible(false);
databaseSave.setVisible(false); databaseSave.setVisible(false);
signer.setVisible(false); signer.setVisible(false);
up_rayon.setVisible(false);
up_nrj.setVisible(false);
up_temp.setVisible(false);
up_cycle.setVisible(false);
up.setVisible(false);
research.setVisible(false);
adder.setVisible(false); adder.setVisible(false);
tech.setVisible(false); tech.setVisible(false);
cycle.setVisible(false); cycle.setVisible(false);
@ -654,7 +660,9 @@ public class LevelScreen implements Screen {
@Override @Override
public void clicked(InputEvent event, float x, float y) { public void clicked(InputEvent event, float x, float y) {
if (worlds.isDebug()) { if (worlds.isDebug()) {
selected.level.rewards[1]+=addervalue;
selected.level.rewards[1]=Math.max(0, Math.min(3,selected.level.rewards[1]));
up_cycle.setText(String.valueOf(selected.level.rewards[1]));
} }
} }
}); });
@ -664,7 +672,9 @@ public class LevelScreen implements Screen {
@Override @Override
public void clicked(InputEvent event, float x, float y) { public void clicked(InputEvent event, float x, float y) {
if (worlds.isDebug()) { if (worlds.isDebug()) {
selected.level.rewards[4]+=addervalue;
selected.level.rewards[4]=Math.max(0, Math.min(3,selected.level.rewards[4]));
up_nrj.setText(String.valueOf(selected.level.rewards[4]));
} }
} }
}); });
@ -674,7 +684,9 @@ public class LevelScreen implements Screen {
@Override @Override
public void clicked(InputEvent event, float x, float y) { public void clicked(InputEvent event, float x, float y) {
if (worlds.isDebug()) { if (worlds.isDebug()) {
selected.level.rewards[3]+=addervalue;
selected.level.rewards[3]=Math.max(0, Math.min(3,selected.level.rewards[3]));
up_rayon.setText(String.valueOf(selected.level.rewards[3]));
} }
} }
}); });
@ -684,7 +696,9 @@ public class LevelScreen implements Screen {
@Override @Override
public void clicked(InputEvent event, float x, float y) { public void clicked(InputEvent event, float x, float y) {
if (worlds.isDebug()) { if (worlds.isDebug()) {
selected.level.rewards[2]+=addervalue;
selected.level.rewards[2]=Math.max(0, Math.min(3,selected.level.rewards[2]));
up_temp.setText(String.valueOf(selected.level.rewards[2]));
} }
} }
}); });
@ -694,7 +708,9 @@ public class LevelScreen implements Screen {
@Override @Override
public void clicked(InputEvent event, float x, float y) { public void clicked(InputEvent event, float x, float y) {
if (worlds.isDebug()) { if (worlds.isDebug()) {
selected.level.rewards[5]+=addervalue;
selected.level.rewards[5]=Math.max(0, Math.min(3,selected.level.rewards[5]));
up.setText(String.valueOf(selected.level.rewards[5]));
} }
} }
}); });
@ -704,7 +720,9 @@ public class LevelScreen implements Screen {
@Override @Override
public void clicked(InputEvent event, float x, float y) { public void clicked(InputEvent event, float x, float y) {
if (worlds.isDebug()) { if (worlds.isDebug()) {
selected.level.rewards[0]+=addervalue;
selected.level.rewards[0]=Math.max(0, Math.min(10000,selected.level.rewards[0]));
research.setText(String.valueOf(selected.level.rewards[0]));
} }
} }
}); });
@ -921,6 +939,36 @@ public class LevelScreen implements Screen {
tech.setVisible(true); tech.setVisible(true);
} else } else
tech.setVisible(false); tech.setVisible(false);
if (button.level.rewards[0] >= 1 || worlds.isDebug()) {
research.setText(String.valueOf(button.level.rewards[0]));
research.setVisible(true);
} else
research.setVisible(false);
if (button.level.rewards[2] >= 1 || worlds.isDebug()) {
up_temp.setText(String.valueOf(button.level.rewards[2]));
up_temp.setVisible(true);
} else
up_temp.setVisible(false);
if (button.level.rewards[4] >= 1 || worlds.isDebug()) {
up_nrj.setText(String.valueOf(button.level.rewards[4]));
up_nrj.setVisible(true);
} else
up_nrj.setVisible(false);
if (button.level.rewards[3] >= 1 || worlds.isDebug()) {
up_rayon.setText(String.valueOf(button.level.rewards[3]));
up_rayon.setVisible(true);
} else
up_rayon.setVisible(false);
if (button.level.rewards[1] >= 1 || worlds.isDebug()) {
up_cycle.setText(String.valueOf(button.level.rewards[1]));
up_cycle.setVisible(true);
} else
up_cycle.setVisible(false);
if (button.level.rewards[5] >= 1 || worlds.isDebug()) {
up.setText(String.valueOf(button.level.rewards[5]));
up.setVisible(true);
} else
up.setVisible(false);
Victory.setVisible(button.level.Cout_orig > 0 || worlds.isDebug()); Victory.setVisible(button.level.Cout_orig > 0 || worlds.isDebug());
Victory.setVictory(button.level.Victory_orig); Victory.setVictory(button.level.Victory_orig);
if (selected != null) if (selected != null)
@ -928,5 +976,4 @@ public class LevelScreen implements Screen {
selected = button; selected = button;
button.setChecked(true); button.setChecked(true);
} }
} }