OK i give up.... I just wanted to let the character move but it just doesn't work!!!
I only have a player subclass and a world subclass
And in the player subclass I only have these codes.
/**
* Control the character
*/
public void controlPlayer()
{
if (Greenfoot.isKeyDown("left"))
{
setLocation(getX()-2,getY());
}
if (Greenfoot.isKeyDown("right"))
{
setLocation(getX()+2,getY());
}
if (Greenfoot.isKeyDown("up"))
{
setLocation(getX(),getY()-2);
}
if (Greenfoot.isKeyDown("down"))
{
setLocation(getX(),getY()+2);
}
}
Yup... What should I do? GF really freaks me out...!