public boolean onScreen() {
        return (rect.x + rect.width >= 0 && rect.x <= world.getScreen().getWidth() &&
                rect.y + rect.height >= 0 && rect.y <= world.getScreen().getHeight());
    }