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

key dessinees LM

parent df2deb81
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,13 @@ public class Painter implements GamePainter{
private void drawKey(Graphics2D crayon){
for(int i = 1;i<=gameCharacter.key;i++) {
crayon.fillRect(40+30*i,60,20,30);
//crayon.fillRect(40+30*i,60,20,30);
//cest la pour les sprites, remplacer Jeu.class par classedanslaquelletues.class
String fn = "Obstacles";
URL url = Jeu.class.getClassLoader().getResource(fn);
assert url != null;
String beginPath = url.toString().substring(6)+"/";
crayon.drawImage(new ImageIcon(beginPath+"Key.png").getImage(), 40+30*i, 60, null, null);
}
}
private void drawLifePoints(Graphics2D crayon){
......
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