@Override
    public void onDraw(Graphics G, int viewX, int viewY) {
        if (X>viewX&&X<viewX+300&&Y>viewY&&Y<viewY+300)
        {
            G.setColor(Color.DARK_GRAY);
            G.drawLine((int)(X-xspeed)-viewX, (int)(Y-yspeed)-viewY, (int)X-viewX, (int)Y-viewY);
            
        }
    }