Can anyone help?
I'm trying to make a character move up, down, left and right but I don't know the code for up and down. I'd like the character to always be of the same rotation. Here's the code I'm using at the moment :
Thanks,
Hawx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | public void movement() { iif(Greenfoot.isKeyDown( "right" )) { move ( 3 ); } if (Greenfoot.isKeyDown( "left" )) { move (- 3 ); } if (Greenfoot.isKeyDown( "up" )) //Here's where I'm stuck { move; } } |