This site requires JavaScript, please enable it in your browser!
Greenfoot back
squad3007
squad3007 wrote ...

2018/5/22

How to a character can move down??

squad3007 squad3007

2018/5/22

#
Hello everyone, i'm beginner can you help me to solve my problem?? my problem is how a character can move down??
danpost danpost

2018/5/22

#
squad3007 wrote...
how a character can move down??
You can use this:
public void act()
{
    setLocation(getX(), getY()+1);
}
or this:
public void act()
{
    turn(90);
    move(1);
    turn(-90);
}
You need to login to post a reply.