I've been trying to use the touch method, but it will not allow me and says
"method touch in class Block cannot be applied to given types;
required: java.lang.class
found: greefoot.Actor"
All I did was copy this code:
public boolean touch(Class clss)
{
List<Actor> list =
getWorld().getObjects(clss),
list2 = new ArrayList();
for(Actor A : list)
if(intersects(A)&&touch(A))
return true;
return false;
}
And I got this error that doesn't seem to be a problem for your program. Do you know why this could be happening?
Recent Comments
2015/5/4
Pixel-perfect collision detection