modif parcour des creatures

- ajout de 2 mobs
- ajout d'un 2e parcour
main
ZIRTR0X 3 years ago
parent 20e1796d08
commit f35e318bb1

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

@ -52,20 +52,17 @@ public class CreatureController {
//creatureImageView.setImage(dog1);
}
if(animal == 2) {
this.creature = new Creature(2,"/image/personnage/Perso1.",0,0 );
this.creature = new Creature(2,"/image/creature/bear1.",0,0 );
}
if(animal == 3) {
this.creature = new Creature(2,"/image/personnage/Perso2.",0,0 );
}
if(animal == 4) {
this.creature = new Creature(2,"/image/personnage/Perso3.",0,0 );
this.creature = new Creature(2,"/image/creature/goat1.",0,0 );
}
}
public void playerInitialisation() throws InterruptedException {
mapCreatureController = new MapCreatureController(lv, map);
mapCreatureController.creerMapCreature();
int max = 4;
int max = 3;
int min = 1;
double a = Math.random() * ( max - min );
int numCreature = (int) Math.round(a) + min;
@ -98,6 +95,9 @@ public class CreatureController {
} catch (InterruptedException e) {
e.printStackTrace();
}
if(i==mapCreatureController.getSizeListeCase()-2) {
creatureImageView.setImage(new Image("/image/creature/void.png"));
}
}
}
};

@ -14,16 +14,27 @@ public class MapCreatureController {
this.map = map;
}
public void creerMapCreature() {
int[][] coordLv1 = {{0,-1},{0,0},{1,0},{2,0},{3,0},{4,0},{5,0},{6,0},{7,0},{8,0},{9,0},{9,-1}};
int[][] coord1Lv1 = {{0,-1},{0,0},{1,0},{2,0},{3,0},{3,1},{4,1},{5,1},{6,1},{7,1},{8,1},{9,1},{9,2},{10,2},{11,2},{12,2},{13,2},{14,2},{15,2},{16,2},{17,2},{18,2},{19,2},{20,2},{21,2},{21,3},{21,4},{22,4},{23,4},{24,4},{25,4},{25,5},{25,6},{26,6},{27,6},{28,6},{28,7},{28,8},{28,9},{28,10},{28,11},{28,12},{29,12},{30,12}};
int[][] coord2Lv1 = {{30,27},{29,27},{28,27},{27,27},{26,27},{25,27},{24,27},{23,27},{23,26},{22,26},{21,26},{20,26},{20,25},{19,25},{18,25},{17,25},{16,25},{15,25},{14,25},{13,25},{13,24},{12,24},{11,24},{10,24},{9,24},{8,24},{7,24},{6,24},{6,25},{6,26},{5,26},{4,26},{3,26},{2,26},{1,26},{-1,26},{-2,26}};
//int[][] coordLv1 = {{1,0},{2,0},{3,0},{4,0},{5,0},{6,0},{7,0},{8,0},{9,0}};
//int[][] coordLv1 = {{0,24},{1,24},{2,24},{3,24},{4,24},{5,24},{5,23},{5,22},{5,21},{5,20},{5,19},{5,18},{6,18},{7,18},{8,18},{9,18},{10,18},{11,18},{12,18},{12,17},{12,16},{12,15},{12,14},{12,13},{12,12},{11,12},{10,12},{9,12},{8,12},{7,12},{6,12},{5,12},{4,12},{3,12},{3,11},{3,10},{3,9},{3,8},{3,7},{3,6},{3,5},{3,4},{3,3},{4,3},{5,3},{6,3},{7,3},{8,3},{9,3},{10,3},{11,3},{12,3},{13,3},{14,3},{15,3},{16,3},{17,3},{18,3},{19,3},{19,4},{19,5},{19,6},{19,7},{19,8},{19,9},{19,10},{20,10},{21,10},{22,10},{23,10},{24,10},{24,11},{24,12},{24,13},{24,14},{24,15},{24,16},{24,17},{24,18},{24,19},{24,20},{24,21},{24,22},{24,23},{24,24},{25,24},{26,24},{27,24},{28,24},{29,24}};
mapCreature = new MapCreature(map.getSizeTile(), map.getSizeMap());
int max = 2;
int min = 1;
double a = Math.random() * ( max - min );
int numCreature = (int) Math.round(a) + min;
if(lv == 1) {
int j = 1;
coordList = coordLv1;
if(numCreature == 1) {
coordList = coord1Lv1;
}
if (numCreature == 2) {
coordList = coord2Lv1;
}
for(int[] i : coordList){
boolean bool = j == 1;
System.out.println("Taille case creature :" +coordList.length);

@ -24,7 +24,7 @@ public class GameLoop {
c = new CreatureController(lv,map, creatureImageView);
timer = new Thread("timer") {
public void run() {
int nbMinutes = 10;
int nbSeconde = 40;
int i = 0;
while(true) {
if(i == 0) {
@ -34,7 +34,7 @@ public class GameLoop {
e.printStackTrace();
}
System.out.println("Timer = " + i);
i = 60 * nbMinutes;
i = nbSeconde;
try {
timer.sleep(1000);
} catch (InterruptedException e) {

Loading…
Cancel
Save