private boolean isOnScreen(AbstractActor a)
    {
        int rightEdge = x + backImg.getWidth(main.getImageObserver());
        int height = backImg.getHeight(main.getImageObserver());
        
        if(a instanceof Block)
        {
            return (a.getXPos() + a.getWidth() >= x && 
                a.getXPos() <= rightEdge); 
        }
        
        return (a.getXPos() + a.getWidth() >= x && 
                a.getXPos() <= rightEdge && 
                a.getYPos() + a.getHeight() + height - gHeight >= y - height && 
                a.getYPos() + height - gHeight <= y); 
    }