Skip to content
Snippets Groups Projects
Commit 4545dada authored by Kellian Mirey's avatar Kellian Mirey
Browse files

Add enemy health bar

parent 37076deb
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ public class Display {
public static Level level;
public static int row = 1;
public static int dec = 6;
public static int dec = 10;
public Display(Level l){
this.level = l;
......
......@@ -98,6 +98,18 @@ public class Level{
}
System.out.print(" ");
System.err.println(this.player.getCurrentEnergy() + "/" + this.player.getMaxEnergy());
System.err.println();
System.out.println("Ennemy " + this.ennemy.getName());
System.out.println();
System.out.print(Terminal.RED+" \t current health "+Terminal.RESET);
double pourcentageEnnemy = (this.ennemy.getCurrentHealth()/this.ennemy.getMaxHealth())*100;
for (int indice = 0; indice < pourcentageEnnemy/2; indice ++){
System.out.print(Terminal.RED+ "▬"+Terminal.RESET);
}
System.out.print(" ");
System.err.println( (int) this.ennemy.getCurrentHealth() + "/" + (int) this.ennemy.getMaxHealth() + " Level : " + ennemy.getLevel() + " ");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment