private void checkMouseClick()
{
\\if (Greenfoot.mouseClicked(null))
if (Greenfoot.mouseClicked(Block.class))
//if (Greenfoot.mouseClicked(World.class))
{
World world = getWorld();
List<Leaf> leaves = world.getObjects(Leaf.class);
for (Leaf leaf : leaves)
{
leaf.changeImage();
}
}
}
I'm trying to have it to where when i click the block it will change all the leaves color. I'm not sure if I'm passing the parameter of Block.class wrong or what..
Also how would I pass the MyWorld.Class as the parameter in the if statement. I've tried using it and it wont recognize any clicks.