Skip to content
Snippets Groups Projects
Commit 7624fcd6 authored by SYMKO TRISTAN's avatar SYMKO TRISTAN
Browse files

ajout des portes

parent 2c10a485
Branches
No related merge requests found
......@@ -32,6 +32,7 @@ public class Panel extends JPanel {
private Image life;
private Image coin;
private Image sword;
private Image door;
public Objet[] obj = new Objet[10];
public int nbObj = 0;
......@@ -52,6 +53,7 @@ public class Panel extends JPanel {
life = ImageIO.read(new File("src/img/life.png"));
coin = ImageIO.read(new File("src/img/coin.png"));
sword = ImageIO.read(new File("src/img/sword.png"));
door = ImageIO.read(new File("src/img/door.png"));
} catch (IOException e) {
e.printStackTrace();
}
......@@ -88,6 +90,7 @@ public class Panel extends JPanel {
"q: Aller à gauche",
"s: Reculer",
"d: Aller à droite",
"e: Faire apparaître",
"",
"o: Quitter le jeu",
"",
......@@ -139,8 +142,7 @@ public class Panel extends JPanel {
g.drawImage(player, x, y, tailleFinale, tailleFinale, this);
break;
case 'D':
g.setColor(Color.RED);
g.fillRect(x, y, tailleFinale, tailleFinale);
g.drawImage(door, x, y, tailleFinale, tailleFinale, this);
break;
case '+':
g.drawImage(chestClosed, x, y, tailleFinale, tailleFinale, this);
......
src/img/door.png

2.67 KiB

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