Hello everybody,
i have written a method. I want to use it by a subclass together with the getOneIntersectingObject() method:
But the the method can't find the moveIntoDirection() method, which i wrote in the superclass. How can i import the moveIntoDirection()-method to the classes I get by getOneIntersectingObject(), so that every greenfoot-class can use it, like the Actor-methods?
public void transport(Class clss)
{
Actor a = getOneIntersectingObject(clss);
if(a!=null)
{
a.moveIntoDirection(getRotation(), speed);
}
}

