public void act() { setLocation( getX() - starspeed, getY() ); if (getIntersectingObjects(Dafad.class)!=null) { JumpySheep Shortcut = (JumpySheep) getWorld(); Shortcut.sgor.setValue(Shortcut.sgor.getValue()+2); } } public void act2() { if (getIntersectingObjects(Dafad.class)!=null) { JumpySheep Shortcut = (JumpySheep) getWorld(); Shortcut.removeObject(this); } }