my actor is moving in y direction. But i want it to stop moving when i press it with the mouse. This is the code i have, but it does nothing to the movement.
public void gelijkmetlijn()
{
balk balk = new balk();
if (Greenfoot.mouseClicked(balk));
{
direction=0;
}