Skip to content
Snippets Groups Projects
Commit 5e915b1f authored by LACOTE Bruno's avatar LACOTE Bruno
Browse files

Add new file

parent 5d33f15f
No related branches found
No related tags found
No related merge requests found
package loaders;
import map.Coffre;
import javax.swing.*;
import java.awt.*;
import java.net.URL;
public class CoffreLoader {
private Image imageCoffre;
private Coffre coffre;
public Image getImageCoffre() {
return imageCoffre;
}
public Coffre getCoffre() {
return coffre;
}
public CoffreLoader(Coffre obs, String nom){
String fn = "Coffre/";
URL url = CoffreLoader.class.getClassLoader().getResource(fn);
assert url != null;
String path = url.toString().substring(6)+"/"+nom;
coffre = obs;
imageCoffre = new ImageIcon(path).getImage();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment