1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| public enum TypeTile
{
//Le problème est ici à cause du new Image(...) dont eclipse me dit qu'il faut qu'ai un unhandled expection mais je ne vois pas du tout comment faire :s
pierre ("base", new Image("images/tile_pierre.png"), false, 0);
private String nom;
private Image img;
private boolean collidable;
private int calque;
private TypeTile(String nom, Image img, boolean collidable, int calque)
{
this.nom = nom;
this.img = img;
this.collidable = collidable;
this.calque = calque;
}
public int getCalque() {
return calque;
}
public String getNom() {
return nom;
}
public Image getImg() {
return img;
}
public boolean isCollidable() {
return collidable;
}
} |
Partager