I'm trying to change the image of a boat after catching a fish and I can't seem to figure out the syntax in order to accomplish this. Right now the Hook image is being affected by setImage and I want the boat's to change. Here's the code I'm using:
public void CatchFish() { int count = 0; if (Greenfoot.isKeyDown("space")) { Actor fish = getOneIntersectingObject(Fish.class); { if (fish != null) { getWorld().removeObject(fish); count = count + 1; if (count == 1) { getWorld().getObjects(Boat.class); setImage("1fish.gif"); } } } } } }