Commit 875c049f authored by Thomas Dupriez's avatar Thomas Dupriez

Added a thing that displays the nb of gold of the character

parent 50931477
...@@ -28,8 +28,9 @@ public class AvatarDisplayer ...@@ -28,8 +28,9 @@ public class AvatarDisplayer
private int barreSizeH = 10; private int barreSizeH = 10;
private Color lifeColorActive = new Color(255,0,0, 255); private Color lifeColorActive = new Color(255,0,0, 255);
private Color lifeColorPassive = new Color(255,0,0, 80); private Color lifeColorPassive = new Color(255,0,0, 80);
private Color expColorActive = new Color(125, 46, 116, 255); private Color goldColor = new Color(255, 209, 61,255);
private Color expColorPassive = new Color(125, 46, 116, 80); // private Color expColorActive = new Color(125, 46, 116, 255);
// private Color expColorPassive = new Color(125, 46, 116, 80);
private String pathCharacter = "/assets/character/"; private String pathCharacter = "/assets/character/";
private String imgTypeCharacter = ".gif"; private String imgTypeCharacter = ".gif";
private String pathBuff = "/assets/"; private String pathBuff = "/assets/";
...@@ -60,11 +61,16 @@ public class AvatarDisplayer ...@@ -60,11 +61,16 @@ public class AvatarDisplayer
g.setColor(lifeColorActive); g.setColor(lifeColorActive);
g.fillRect(pictureSize + 10,10,Math.round(barreSizeW * (float)character.getHP() / character.getMaxHP()),barreSizeH); g.fillRect(pictureSize + 10,10,Math.round(barreSizeW * (float)character.getHP() / character.getMaxHP()),barreSizeH);
/** Exp **/ /** Gold **/
g.setColor(expColorPassive); g.setColor(goldColor);
g.fillRect(pictureSize + 10,25, barreSizeW,barreSizeH); g.setFont(new Font("Arial", Font.PLAIN, 20));
g.setColor(expColorActive); g.drawString("" + character.getGold(), 100,50);
g.fillRect(pictureSize + 10,25,Math.round(barreSizeW * (float)character.getExp() / character.getMaxExp()),barreSizeH);
// /** Exp **/
// g.setColor(expColorPassive);
// g.fillRect(pictureSize + 10,25, barreSizeW,barreSizeH);
// g.setColor(expColorActive);
// g.fillRect(pictureSize + 10,25,Math.round(barreSizeW * (float)character.getExp() / character.getMaxExp()),barreSizeH);
/** Buffs **/ /** Buffs **/
for (int i = 0; i < buffList.size(); i++) for (int i = 0; i < buffList.size(); i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment