public void blink() {
        if (getWorld().getObjects(Dolphin.class).size() != 0) {
            getXD = ((Dolphin) getWorld().getObjects(Dolphin.class).get(0)).getX();
            getYD = ((Dolphin) getWorld().getObjects(Dolphin.class).get(0)).getY();
            setLocation(getXD - 20, getYD + 25);
        }
        if (shocked > 0) {
            if (blinks <= 30) {
                setImage(a1);
            }
            else if (blinks > 30 && blinks < 60) {
                setImage(a2);
            }
        }
        else if (shocked == 0) {
            getWorld().removeObject(this);
        }
    }