private Sprite(String path) {
        try {
            image = ImageIO.read(Sprite.class.getResource(path));
            this.path = path;
            this.w = image.getWidth();
            this.h = image.getHeight();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }