Skip to content
Snippets Groups Projects
Commit 36ca9c01 authored by Louis MALTERRE's avatar Louis MALTERRE
Browse files

indexBoss LM

parent b5996b3a
No related branches found
No related tags found
No related merge requests found
......@@ -35,4 +35,15 @@
</resources>
</build>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit4-runner</artifactId>
<version>5.0.0-ALPHA</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -173,6 +173,7 @@ public class LevelManager {
}
public List<Monster> generateMonsterTable() {
List<Monster> monsterList = new ArrayList<>();
Boss boss = new Boss(new Coordonnees(1, 1), 1, 1, 1, 1, 1);
for (int j = 0; j < Jeu.TILES_IN_HEIGHT; j++){
for (int i = 0; i < Jeu.TILES_IN_WIDTH; i++) {
int index = levelOne.getSpriteIndex(i, j);
......@@ -189,12 +190,13 @@ public class LevelManager {
}
//Boss
if (index == 47) {
monsterList.add(new Boss(new Coordonnees(32*i, 32*j-140/2), 500, 32, 96, 3, 30));
indexBoss = monsterList.size()-1;
boss = new Boss(new Coordonnees(32*i, 32*j-140/2), 500, 32, 96, 3, 30);
monsterList.add(boss);
}
}
}
System.out.println(monsterList);
indexBoss = monsterList.indexOf(boss);
return monsterList;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment