I wrote this game in version 3.0.1 and would like to know how to update the code to use in 3.0.3. Not sure why it's giving me this error:
java.lang.NoSuchMethodError: Mercury.getOneIntersectingObject(Ljava/lang/Class;)Ljava/lang/Object;
at Mercury.checkCollision(Mercury.java:60)
at Mercury.act(Mercury.java:37)
at greenfoot.core.Simulation.actActor(Simulation.java:604)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:562)
at greenfoot.core.Simulation.runContent(Simulation.java:221)
at greenfoot.core.Simulation.run(Simulation.java:211)
/**
* This method checks to see if Mercury is colliding with a cloud.
* If he is, then he will fall from the sky and lose his wings.
*/
private void checkCollision()
{
Cloud cloud = (Cloud) getOneIntersectingObject(Cloud.class);
if (cloud != null)
{
World world = getWorld();
Actor mercury = (Actor) world.getObjects(Mercury.class).get(0);
cloud.setImage("largewings.png");
cloud.setLocation(getX(), getY());
Greenfoot.playSound("ohno.wav");
getWorld().removeObject(this);
}
}