public void render(Screen screen) {
        //        double open = Math.sin(System.currentTimeMillis() % 1000 / 1000.0*Math.PI*2)*0.5+0.5;
        double open = openness * 0.47;
        List<Sprite> doorSprites = ((Door) sprites).doorSprites;
        if (level.getTile(x, y - 1).isWall() && level.getTile(x, y + 1).isWall()) {
            sprites.rotate(0, true);
            for (int i = 0; i < doorSprites.size(); i++) {
                Sprite sprite = doorSprites.get(i);
                if (sprite.z < 0.45) {
                    sprite.z -= open;
                } else {
                    sprite.z += open;
                }
            }
        } else {
            sprites.rotate(Math.PI * 2 * 0.25, true);
            for (int i = 0; i < doorSprites.size(); i++) {
                Sprite sprite = doorSprites.get(i);
                if (sprite.x < 0.45) {
                    sprite.x -= open;
                } else {
                    sprite.x += open;
                }
            }
        }
        super.render(screen);
    }