I have a huge problem concerning the main character who doesnt want to stop when i hit the platform(jump n run). I already tried it with obejctatoffset but that wont work, cause greenfoot doesnt recongnize the character.
this code is written in the Platform.class cause they are the ones moving
same with the right side
is there any other possibility? Please let me know, thanks in advance!
private boolean an = true;
Actor contactleftdown = getOneObjectAtOffset(-50,1,Figur.class);
Actor contactleftup = getOneObjectAtOffset(-50,19,Figur.class);
if ( contactleftdown !=null || contactleftup !=null)
{
an = false; //off
}
else
{
an = true;//on again
}
if (Greenfoot.isKeyDown("left")) //&& an == true)
{
moveRight();
}