Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main;
- import java.io.IOException;
- import org.newdawn.slick.opengl.Texture;
- import org.newdawn.slick.opengl.TextureLoader;
- import org.newdawn.slick.util.ResourceLoader;
- public class Textures {
- public static Texture loadPNG(String path) throws IOException {
- return TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream(path));
- }
- public static boolean loadTextures() {
- try {
- final Texture STONE = loadPNG("main\\textures\\stone.png"); // This line here I can't do public static final...
- } catch (IOException e) {
- return false;
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement