private Sprite(String path, int x, int y, int w, int h) {
        try {
            image = ImageIO.read(Sprite.class.getResource(path)).getSubimage(x, y, w, h);
            this.path = path;
            this.w = w;
            this.h = h;
        } catch (IOException e) {
            e.printStackTrace();
        }
    }