Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.northwind.game.body;
- import java.awt.Image;
- import java.io.File;
- import java.io.IOException;
- import java.util.ArrayList;
- import javax.imageio.ImageIO;
- public final class BodyDefinition {
- private int width;
- private int height;
- private Image image;
- private static ArrayList<BodyDefinition> defs = new ArrayList<>();
- public static void loadDefs(String path) {
- }
- public static BodyDefinition getDef(int id) {
- return defs.get(id);
- }
- private BodyDefinition(int width, int height, String path) {
- this.width = width;
- this.height = height;
- File file = new File(path);
- try {
- image = ImageIO.read(file);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement